Putty GB2312 & BIG5 Chinese Character set patch

Source: Internet
Author: User

Note: Ashamed ashamed, finally found that only need a statement can be done, modify WINUCS.C function wc_to_mb directly after entering the function set codepage=936; You can display GBK in Chinese, and if you want to show BIG5, change to 950.


Putty If a monospace font that does not support the Chinese character set is generally selected, it cannot be entered in Chinese. UTF8 encoding is the configuration character set, but ANSI's GB2312 & BIG5 character set is not supported unless you choose a font that supports the GB2312&BIG5 character set, such as "Fixedsys" "Nsimsun" and other Chinese fonts. The following patch is for Putty add GB2312 & BIG5 Character set support, VC compiled after the selection of the required character set.

---putty-src-orig/windows/winucs.c	2015-07-25 11:22:48.000000000 +0800
+ + + PUTTY-SRC/WINDOWS/WINUCS.C	2015-08-21 10:47:56.350800800
+0800 @@ -429,7 +429,8 @@ -429,7 "CP819"
     , 28591}, {"
     CP852", 852},
     {" CP878 ", 20866},
-
+	{" BIG5 ", 950},
+	{" GB2312 ", 936},
+	{" GB18030 ", 54936},
     { "Use font encoding",-1},
 
     {0, 0}


The following effect diagram



Note:

If you use UTF8 encoding, there is a quick way to select the UTF-8 character set, which is in the Putty Command window input

Echo-ne ' \e%g\e[?47h\e%g\e[?47l '


You can quickly select the UTF-8 character set and enter View UTF-8 Chinese.



Reference:

Quick Select UTF-8 Character Set http://planetozh.com/blog/2007/08/how-to-display-utf8-in-your-putty-bash-shell/

Windows character encoding table https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756 (v=vs.85). aspx





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.