Pay attention to
- First things first: Restart the AS after the configuration
- First things first: Restart the AS after the configuration
- First things first: Restart the AS after the configuration
Uniform file coding
- Go to Settings >Editor> File Encodings and change all three to UTF-8
Font unification
- Open the Settings, then search for “font” and change Appearance, font, and Color Scheme font to “Microsoft YaHei”.
Change the VM format to UTF-8
Windows setup
- Menu bar → Help → Edit Custom VM Options (if not available, you will be prompted to create) :
- Append a row
-Dfile.encoding=UTF-8
- Then the menu bar → File → Invalidate and Restart
And garbled code?
Make sure your original code is UTF-8. If you’ve ever saved or modified GBK code (open it doesn’t matter) or downloaded it from the server, it’s a mess, and you can’t undo it no matter how you modify it. The reason is simple: saving when garbled destroys the original byte.
- For example: suppose ‘01011111’ is the ‘I’ of UTF-8, now you open it in GBK format, GBK finds no such thing as’ 01011111 ‘, but ‘0101’, which stands for ‘? ‘, so ‘I’ opens’? ‘, and the rest of it is discarded. If you click save, of course it will only save ‘0101’ and it won’t be there. Eventually, whether you use UTF-8 or GBK, it’s impossible to see normal characters anymore because the bytes are completely messed up.
Note: If your code was previously written by GBK, please use a third-party tool to convert it to UTF-8. AS does not automatically convert to UTF-8.