Mac SSH connection Linux cloud Server Chinese garbled or unable to display resolution

Source: Internet
Author: User

Issue 1: The server is ubuntu16.04, the Mac comes with the SSH connection after the normal input Chinese?

Solution: This is generally the terminal and server character set mismatch, macosx the default is the UTF8 character set.

Open the Edit. bashrc file:

VI ~/.BASHRC

At the end of the file, add:

Export Lc_all=en_us. UTF-8  export LANG=en_us. UTF-8

Restart the server to display Chinese correctly.

Question 2: Write the Chinese HTML page display garbled:

Solution: Set the encoding format in the HTML file:

<http-equiv= "Content-type"  Content= "text/html; Charset=utf-8"  />

and set vim with Utf-8 encoding, edit the. vimrc file, and insert at the end of the file:

VI ~/. Vimrcset fileencoding=utf-8

Mac SSH connection Linux cloud Server Chinese garbled or unable to display resolution

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.