Mac uses native2ascii to view the configuration file

Source: Internet
Author: User

Use of the native2ascii command: 1. if you want to use Unicode and then convert it back to generate the Chinese characters we can understand: Use the parameter native2ascii-reverse-encoding GBK (or gb2312 ); you can also save-encoding GBK (or gb2312) and only use-reverse. Example: native2ascii-reverse-encoding UTF-8 messages_special_zh_cn.properties A. properties initially uses GBK and found to be ungarbled. If the-encoding UTF-8 is not added, the local GBK encoding is used by default, and the error is the same as the left. Therefore, you need to specify the UTF-8. 2. If you want to use local Chinese to convert to unicode encoding: Use the parameter native2ascii-encoding GBK (or gb2312); 3. native2ascii does not support strings.

4. if you do not want to generate an intermediate file and then query it, you can use the pipeline: native2ascii-reverse-encoding UTF-8 messages_special_zh_cn.properties | grep "2253354" to deepen your understanding of pipeline usage: no intermediate results are generated.

5. native2ascii only supports file operations, but does not support string operations. Another clever method is to use propertieseditor in eclipse for editing and then open it in texteditor.

 

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.