Java problem solving: "error: un dable characters encoded for GBK", javagbk
References: http://blog.csdn.net/l1028386804/article/details/46583279
Scenario:
The following error occurs when you use javac to compile a java file:
Solution:
Use the javac-encoding UTF-8 to compile the. java file:
Note:
ANSI: the standard text storage format preset by the American National Standards Association. Simplified Chinese code: GB2312, which is actually an ANSI code page 936
UTF-8: Universal word set conversion format, which is designed for Transmission Encoding, binary, 8-bit for Unicode encoding, if you are using an old-style transmission media that only supports 8 important data types in the same type of metadatabase group, you can select the UTF-8 format.
In the UTF-8, English characters are still the same as ASCII encoding, so the original function library can continue to use. The Chinese encoding range is between 0080-07FF, so it is represented by two bytes (but the two bytes are different from those encoded by GB ), UTF Encoding can be processed using specialized Unicode processing classes.