Bug in file encoding detection *false alarm* |
Site Admin
|
Could you please submit your file there?
|
||||||||||||
|
|
Sure. I can't attach files here but, as I said, it happens with ALL .html files. Try this one for instance
Name: testing.html Content: abcåäö Here's a link: http://mywebsite/files/testing.html The problem is when the file uses characters from the upper half of the iso code page. Then opening it will report "Failed to translate from UTF-8 to UTF-16LE" |
||||||||||||
|
Site Admin
|
I can't replicate the problem there.
If HTML file does not contain encoding in its meta, the system default encoding is used. If it has for example UTF-8, this encoding should be detected and used by the IDE. See example below: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> if your file is iso-8859-1, please change it to <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> or remove it at all and make sure that fileenc.cfg does not keep encoding selected before. |
||||||||||||
|
|
No, that's not the case. I have the PhpED Default encoding set to iso-8859-1. Or do you mean the Windows default encoding?
I would imagine it is pretty common to work with files containing HTML fragments when using template based systems, so all files will not contain encoding or charset attributes. If at least PhpED could use it's own Default file encoding in these situations that would be good enough for now. |
||||||||||||
|
|
Update: Perhaps it is my installation of PhpED that has gone crazy. Now I get a "Failed to translate from UTF-16LE to ISO-8859-1" when saving a perfectly normal PHP file that at this point only contains ASCII-7 characters.
|
||||||||||||
|
Site Admin
|
In this case it would not raise any error boxes. Try to save as UTF8 and check if there are any 8bit characters. (I know that it's hard to find problems when such transliteration errors happen, because line and position are not displayed, YET) |
||||||||||||||
|
Save failed *was* false alarm |
|
OK, i *did* actually have a spurious unicode character in the file. As you said, it wasn't easy to find - the character was an en-dash, which looks exactly the same as a minus character when using a monospaced font.
|
||||||||||||
|
Site Admin
|
4514 will fill this gap. This version displays transliteration errors like shown below:
|
||||||||||||
|
|
That is great!
Note that the problem with *opening* files still remain though. |
||||||||||||
|
Site Admin
|
"Opening" and "saving" both are processed though the same procedures and error messages are very similar:
"Failed to read file in blahblahblah encoding, some characters will be replaced with "?" symbols,Line 27, Position 15, Character: 0xF2". |
||||||||||||
|
|
The problem described earlier in this thread.
|
||||||||||||
|
Bug in file encoding detection *false alarm* |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by