Windows files are garbled on Ubuntu and Windows reads normally

Source: Internet
Author: User

In the Ubuntu system, when reading Windows files in the display of garbled, and in the Windows read Normal, the main reason for the problem is different coding, the following small series to introduce the Windows file on Ubuntu display garbled solution.

Take Ubuntu 13.04 for example

  Garbled Reason:

Garbled problem this is because the default encoding in Windows is GBK, under Ubuntu is UTF-8, so under the Windows annotation, Ubuntu becomes garbled.

  Install Vim First

Running in command line mode

sudo apt-get install vim

Find Vim This configuration folder

Generally not modified in this file

is to add a configuration file in your home directory

1 Running vim ~/.VIMRC command

2 "is the note start symbol

Set Nu setting Displays line numbers

Syntax on "Open grammar check

Set Showmode display status in bottom left corner

Set Autoindent to Indent

Set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936

Set Termencoding=utf-8

Set Encoding=utf-8

Save OK.

Above is the Windows file on Ubuntu display garbled solution, if you encounter the same problem, you need to install the Vim tool reconfiguration file, the command line to operate.

Related Article

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.