Page 1 of 1

code page problem

Posted: 02.05.2018 13:08
by powerpcer
when a file it detected "ANSI" and i input chinese into it. then it shows normally,
but if i type save and reopen the file, all chinese i inputed disappear?
what's wrong?

Posted: 02.05.2018 16:27
by Alexey
"ANSI" is not a codepage, it is alias for european codepage (seems 125x or 437). CJK ANSI codepages not used for alias.

Posted: 03.05.2018 01:39
by powerpcer
so why CP950 detect to european?
and for default, no matter what you assume it was, when saving, at least hint user for missing codepage setting, not just silence saved and lost.

Posted: 03.05.2018 06:41
by kvichans
powerpcer wrote:when saving, at least hint user for missing codepage setting, not just silence saved and lost.
Agree. If content conflicts with codepage need to ask before saving. E.g. "Cannot save the file with current CP - Latin1. Change CP? Cancel?"

IMHO: The "conflict" condition:
- CP has 256 characters (Latin, ANSI, CP12*, ...)
- In text there are characters from more then one 256-pages

Posted: 03.05.2018 08:05
by powerpcer
from my point, editor just care about what user's input, and save it, code page is just for presentation.
for code page, i think only 4 type ansi, utf-8, ucs2, ucs4
ansi for all tradition code page, include DBCS, no need to convert, just save what they input. just presentation problem
UTF-8 to ansi/UCS2/UCS4 need convert for saving.