PuTTY icon indicating copy to clipboard operation
PuTTY copied to clipboard

win10启用默认编码为UTF-8后整个界面乱码

Open super-vip opened this issue 6 years ago • 2 comments

首先感谢你的汉化,一直在受益中。 今天无意中发现,在win10的区域设置启用默认编码为UTF-8后整个界面乱码。

super-vip avatar Nov 19 '18 16:11 super-vip

两个原因:

  1. PuTTY 没有直接使用 res 资源来构建界面。
  2. 构建界面代码中的字符串也没有使用 _TEXT 宏,采用的兼容 Win9x 的 GB2312 编码。

所以将简体版 Windows 默认改成 UTF-8 编码后会乱码。

larryli avatar Nov 20 '18 09:11 larryli

windows/version.rc2 目前使用的非 unicode 字符串:

-	/* "lang-charset" LLLLCCCC = (UK English, Unicode) */
-	BLOCK "080904B0"
+	/* "lang-charset" LLLLCCCC = (CN 中文, 中华人民共和国) */
+	BLOCK "080404B0"

larryli avatar Sep 10 '19 07:09 larryli

MSVC 2015 以后版本,中文源码使用 /utf-8 参数编译支持 Win10 UTF-8 编码。

CP936(简体中文)是采用 /source-charset:utf-8 参数编译。

larryli avatar Oct 17 '22 03:10 larryli