File encoding conversion iconv

Source: Internet
Author: User

File encoding conversion iconv
1. The iconviconv command is used to convert the file encoding. When encountering a gbk-encoded file, you need to convert it to utf8 and use this command directly. 2. Usage iconv -- list: list the iconv-supported encoding lists

Iconv-f original encoding-t new encoding filename-o newfile
-F: from source encoding-t: to new encoding-o file: Optional. If not, convert the current file directly and use-o to retain the source file. 3. Example
# View the file $ file testtest: UTF-8 Unicode text # convert $ iconv-f utf8-t gbk test-o test. gbk $ ll-rw-r -- 1 work 117 Aug 9 test-rw-r -- 1 work 83 Aug 9 test. gbk # view the file $ file test * test: UTF-8 Unicode texttest. gbk: ISO-8859 text
Address: http://blog.csdn.net/yonggang7/article/details/38459807

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.