Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greate work. But... #5

Open
tim3385 opened this issue Dec 1, 2018 · 2 comments
Open

Greate work. But... #5

tim3385 opened this issue Dec 1, 2018 · 2 comments
Labels

Comments

@tim3385
Copy link

tim3385 commented Dec 1, 2018

能不能不主动自动帮用户转码呢?对这个帮倒忙蛮烦恼的。

其他正在试用,以为图形学牛人搞的文本编辑器也如此用心,希望有前途成为新一代CODER高手们希望的lightweight编辑器。

@wanyancan
Copy link

It was an open issue already.
#4 (comment)

@HouQiming
Copy link
Owner

这个Issue应该是说的只能保存UTF-8的问题。#4 说的是不能读取GB,其实还是不太一样。

关于保存,核心问题是QPad内部表达只能用UTF-8。如果支持GB/JIS/BIG5的内部表达,算法就会变得复杂很多,得不偿失。EUC系列作为内部表达更是根本不可能。

所以说只要输入文件不是UTF-8,转码是必然会发生的。理论上可以在保存的时候转回去,但那样其实更有问题:现在Unicode Emoji很流行,可GBK、JIS、BIG5等老编码完全无法表达。如果保存的时候不用UTF-8,Emoji就会无故丢失。在日文文档中写中文人名也会有同样问题(日文没有的汉字会变成?)。再者用Windows API转到UTF-8再转回去未必就能无损,看上去正确其实中间一个字符说不定就变成了?,更加危险。

最后,UTF-8拥有诸多好处:https://utf8everywhere.org/,Windows都已经开始支持CP65001,新版RPG Maker的默认编码也不再是JIS,还是希望大家能尽量与时俱进一下 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants