Complete UTF-16 support


#1

I’ve read the other posts regarding support for encoding schemes other than UTF-8 and find that I can open UTF-16 encoded files and then manually change the displayed encoding successfully.

I installed the auto-encoding package which has worked with the small number of encodings I’ve tested, UTF-8, UTF-16 LE and Western (Windows 1252).

Where things are still not right is in regards to retention of the byte order marker (BOM) for the UTF-16 encodings. If I open a UTF-16 LE encoded file, edit it and then save it (to the same name or a new name) the BOM is not retained. This causes all sorts of problems with programs that expect a BOM on files that are encoded in UTF-16 (LE or BE), even Atom itself. I’m going to assume the encoding auto-detection makes use of the BOM because after saving the UTF-16 file Atom will no longer detect it as UTF-16 correctly. I’ve also run into instances where the XML parser I use refuses to load a file encoded as UTF-16 that doesn’t have the BOM on it.

Ken Wheeler