zoukankan      html  css  js  c++  java
  • 【转】解决PuTTY的中文乱码问题

    本文综合了其他人的经验和自己的实践。 首先,设置 PuTTY: 打开putty,选择 Category中的Windows--->Appearance---> Font settings 把"字体"改为"Fixedsys"(或者其他中文字体),字符集为CHINEASE_GB2312 再选择 Category中的Windows--->Translation ----> Received data assumed to be ... 把character设置为 "Use font encoding" 保存后登陆远程主机就可以了。如果显示仍然是乱码,说明远程主机的语言设置不是中文,这就需要更改远程主机的环境变量。 设置远程主机环境变量: 在远程主机的 home目录下,有一个.bash_profile文件,用来执行登入 shell 时要执行的命令。用文本编辑器编辑这个文件,加入以下语句: export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:zh declare -x LANG="zh_CN.UTF-8"JsBLinux联盟 declare -x LANGUAGE="zh_CN:zh" 将远程主机的语言环境设置为中文环境。在远程主机保存文件后,执行: >. .bash_profile 然后设置putty,选择 Category中的Windows--->Translation ----> Received data assumed to be ... 把character设置为 "UTF-8" 这样就能显示中文了。

  • 相关阅读:
    leetcode 18 4Sum
    leetcode 71 Simplify Path
    leetcode 10 Regular Expression Matching
    leetcode 30 Substring with Concatenation of All Words
    leetcode 355 Design Twitte
    leetcode LRU Cache
    leetcode 3Sum
    leetcode Letter Combinations of a Phone Number
    leetcode Remove Nth Node From End of List
    leetcode Valid Parentheses
  • 原文地址:https://www.cnblogs.com/yanchao/p/1364700.html
Copyright © 2011-2022 走看看