UTF-8 encoding issues

General questions about using TextPad

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

Post Reply
Thomas Oellrich

UTF-8 encoding issues

Post by Thomas Oellrich »

Hi,

I use TextPad 4.4.1 on Windows NT. When I save a file with UTF-8 encoding, then close the file and open it again, the status bar displays that the file is ANSI encoded. Does anybody know why that happens?

Thanks
Tom
Andrew Webber

Re: UTF-8 encoding issues

Post by Andrew Webber »

Did anyone reply to your question? I don't see any.

I'm having the same problem intermittently, I found that if there were no extended (i.e. not 7-bit ASCII) characters in the document, I could save-as utf-8 but it would re-open as ANSI. I fixed one example by putting an é into the document (it was an XML instance so I put it in a comment) and then saving as utf-8. After that, TextPad recognized it, which suggests it reads the file to try and infer what the encoding is.

What I don't understand is why they don't use the utf-8 Byte Order Mark (EF BB BF). In fact, not only does TextPad not add those three bytes when saving as utf-8, it removes them if they were already there!

Is there a way to stop this? I have to feed the file to another application that expects the BOM.

Thanks!

andrew
Post Reply