IDEA garbled file solution

Opening a code file of someone else's Chinese is garbled:
Insert picture description here
I guess this code should be gbk coded, just by
Insert picture description here
selecting gbk:
Insert picture description here
reload in the lower right corner of IDEA .
After reload, convert to UTF-8. After that, this file will be UTF-8. After this file is opened with UTF-8 encoding, it will not be garbled anymore:
Insert picture description here
Reference: Solve the problem of IntelliJ IDEA Chinese garbled in two minutes

Guess you like

Origin blog.csdn.net/jiaobuchong/article/details/90138635