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.