Missing BOM on UTF16LE

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
rdcpro
Posts: 3
Joined: Tue Mar 08, 2011 4:51 pm

Missing BOM on UTF16LE

Post by rdcpro »

It seems like Textpad understands unicode, as it gives me the option to save a file in UTF16LE or BE. And when I open a file, even though UTF16 isn't an option, it seems to recognize the byte order mark and identifies the file as UTF16. But when I save a unicode file, incredibly, it removes the BOM that's already in the file. This screws up the file irretrievably (unless perhaps if I open the file in a different hex editor, and manually add FFFE).

Believe it or not, my only option is to copy and paste the text from the UI into Notepad, and save the file that way. Because this works, I'm pretty sure Textpad understands the encoding correctly, it just fails on save.

I've upgraded to the latest version, and the behavior is the same.

I've tried UTF8, but had troubles round-tripping text files saved in this way too. The file ends up with illegal byte sequences for some characters.

What's up with this?

Regards,
Mike Sharp
Post Reply