Newer versions of IntelliJ will ask if you want to "reload" or "convert" the file to the new encoding.
I had a file that was shown using UTF-8
but was written in x-macRoman
. I selected x-macRoman
and selected "Reload" so that the encoding is used to interpret the file, then I selected UTF-8
and selected "Convert". Now my file is correctly encoded as UTF-8
Tested with version 12.1.3
source share