Solve the Problem of garbled characters in UTF-8 on Linux and securecrt

Source: Internet
Author: User

First check securecrt,

Set

Options-> Global Options-> General-> default session-> edit default settings-> terminal->

Appearance-> character encoding,

Select the UTF-8.

 

Then set

Options-> Global Options-> General-> default session-> edit default settings-> terminal->

Appearance-> font,

Select a font that does not contain garbled Chinese characters, such as fixedsys,, and.

Then exit securecrt and log on again.

Because the default Linux encoding is UTF-8, at this time, Chinese characters can be displayed normally.

If the code is still garbled, continue to check Linux settings

Open/etc/sysconfig/i18n

Change Lang to a character set that supports UTF-8

For example: lang = "zh_CN.UTF-8 ″

Or lang = "en_US.UTF-8 ″

Vim settings are in the vimrc file and under the/etc directory of the system. In addition ~ If a vimrc file exists in the directory, the system sets the file according to the file.

Edit. vimrc (_ vimrc), and add:

Let $ lang = "zh_CN.UTF-8"

Set fileencodings = UTF-8, Chinese, Latin-1

Set termencoding = UTF-8

Set encoding = UTF-8

Then OK.

If similar settings already exist in the configuration file, modify the settings as needed.

It can be correctly displayed, but the error message of Linux itself is garbled and cannot be correctly edited using vim.

 

This article from the Linux community website (www.linuxidc.com) original link: http://www.linuxidc.com/Linux/2011-04/34077.htm

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.