-
Notifications
You must be signed in to change notification settings - Fork 179
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
对在简体中文的Window10在默认的控制台打印包含中文的字符串会出现排版问题的修改 #87
Comments
(G__gle Translate does what appears to me to be a surprisingly good job of translating the above text.) Thanks for posting this. It's an interesting solution to the fullwidth/halfwidth character problem. It will work only for the Windows console version (I think), but perhaps that's all you need. Also, it assumes all Unicode points above 0x7ff (those encoded as three bytes in UTF8) are fullwidth; it's really more complex than that. Also, points 0x100 to 0x7ff (where retval == 2), including many European languages, are ignored. (Everything in that range is either half- or zero-width.) You could use this
You'll still have problems with fullwidth characters. Mainline PDCurses is ill-suited to Asian languages. I had to make a lot of changes before fullwidth characters worked properly; see my fork for details. Among other things, a 'dummy' character has to be stored next to each fullwidth character to make everything line up properly. Also, mainline PDCurses does not support combining characters or supplemental-plane Unicode (Unicode points past 64K). I don't know if that's a problem for your use. |
Translation:
|
在简体中文的Window10默认的控制台打印包含中文的字符串会出现排版问题,中文字符会叠加在一起,我追踪到在这里做一些修改,实现正常的中文字符排版,可我没有环境去测试日文,韩文、繁体中文等亚洲地区及其他国家的文字。
以下是我修改过的内容:
修改的方式比较粗暴,如果原作者能够做官方修改就更好了。
The text was updated successfully, but these errors were encountered: