Hello World, hello Enrico,
I've noticed today that the "Write Unicode BOM" function from geany writes FF FE for my test file for which I used UTF-8 encoding. FF FE is the BOM for UTF-16 little endian, for UTF-8 the correct BOM would be EF BB BF
See: http://www.unicode.org/unicode/faq/utf_bom.html#BOM
Is this a bug or is there any reason for doing so?
Best regards Andreas
P.S. I noticed that other editors also write FF FE for UTF-8 files...
On Tue, 23 Jan 2007 15:58:01 +0100, Andreas Tscharner andy@vis.ethz.ch wrote:
Hello World, hello Enrico,
I've noticed today that the "Write Unicode BOM" function from geany writes FF FE for my test file for which I used UTF-8 encoding. FF FE is the BOM for UTF-16 little endian, for UTF-8 the correct BOM would be EF BB BF
Er, here it works as expected. - open a file - set the encoding to UTF-8 - set to write a BOM (document menu->Write Unicode BOM) - type some text - save the file If I open the saved file with a hexeditor, it starts with EF BB BF. Which version of Geany, GLib and iconv you are using? Are you perhaps using another platform than x86?
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
Enrico Tröger wrote:
Er, here it works as expected.
- open a file
- set the encoding to UTF-8
- set to write a BOM (document menu->Write Unicode BOM)
- type some text
- save the file
If I open the saved file with a hexeditor, it starts with EF BB BF. Which version of Geany, GLib and iconv you are using? Are you perhaps using another platform than x86?
Uuups My bad. For my defense: I previously used UltraEdit (in Hex-View) to watch the file and it says: FF FE When I change the editor (example: HexEdit) it shows (on the very same file) the correct EF BB BF pattern.
Sorry for bothering.
Best regards Andreas
On Tue, 23 Jan 2007 16:46:09 +0100, Andreas Tscharner andy@vis.ethz.ch wrote:
Enrico Tröger wrote:
Er, here it works as expected.
- open a file
- set the encoding to UTF-8
- set to write a BOM (document menu->Write Unicode BOM)
- type some text
- save the file
If I open the saved file with a hexeditor, it starts with EF BB BF. Which version of Geany, GLib and iconv you are using? Are you perhaps using another platform than x86?
Uuups My bad. For my defense: I previously used UltraEdit (in Hex-View) to watch the file and it says: FF FE When I change the editor (example: HexEdit) it shows (on the very same file) the correct EF BB BF pattern.
Sorry for bothering.
No problem. But perhaps you found a bug in UltraEdit ;-).
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key