code page problem

Post Reply
powerpcer
Posts: 38
Joined: 22.09.2017 12:37

code page problem

Post 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?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

"ANSI" is not a codepage, it is alias for european codepage (seems 125x or 437). CJK ANSI codepages not used for alias.
powerpcer
Posts: 38
Joined: 22.09.2017 12:37

Post 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.
User avatar
kvichans
Posts: 203
Joined: 07.10.2012 05:45

Post 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
CudaText 1.163, TC9.51x32, Win10x64(1920x1080)
powerpcer
Posts: 38
Joined: 22.09.2017 12:37

Post 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.
Post Reply