Page 1 of 1
Some UTF-8 Files Open As ANSI - Latin I
Posted: Mon Dec 24, 2018 4:53 am
by dchernik
Hi, I'm using TextPad 8.1.2 64-bit on Windows 10 1809.
I create exports using phpMyAdmin of 3 identically configured MySql WordPress databases as UTF-8 .sql files.
2 of them open with TextPad correctly as UTF-8 (Unix)
1 opens as ANSI - Latin I with all manner of corrupted characters.
Notepad opens all 3 files without problems as UTF-8, and all chars are Ok.
This appears to be a bug with TextPad specifically; please look into it. Thanks.
Posted: Fri Dec 28, 2018 10:58 am
by kikosoft2
This is a long standing issue with TextPad.
It happens because textpad tries to determine what the character encoding is when it opens a file. Whenever in doubt it uses ANSI, which is the default.
Adding a BOM to your UTF-8 files might help, but that might not be practical. For instance, PHP doesn't like BOM's.
What seems to help in my PHP file is when I add this line:
Code: Select all
// äöü (prevent textpad utf-8 loading bug)
but I do not garantee this. Check this forum for more help.
I do not expect Helios Software Solutions to solve this problem any time soon. The basis of this editor works in ANSI. The maker is English and therefore problably never needs to use anything but ANSI characters. I think Textpad is just a side-project, kept alive because there are some people who like it. I like it too, but wished it was better supported.
Posted: Fri Dec 28, 2018 1:22 pm
by dchernik
This actually works, thanks.
This particular file had only a few Unicode chars, so adding 3 more made a difference.
Open in Notepad (or even Word, I guess, which asks to confirm encoding), add the line, save, open with TextPad.
Re: Some UTF-8 Files Open As ANSI - Latin I
Posted: Wed Jan 02, 2019 9:14 am
by AmigoJack
dchernik wrote:Notepad opens all 3 files without problems as UTF-8, and all chars are Ok.
If the files have no BOM I think you're confusing Notepad with Notepad++.
Posted: Wed Feb 27, 2019 3:49 pm
by Nick
Seems to be working for me - stopping me tearing my hair out!
How does that code do it?
Posted: Fri Mar 29, 2019 1:07 am
by ineuw
Check each document setup in Document classes, including the Default class and you will find the document that saves as ANSI.