0
public class Test {
    public static void main(String[] args) {
        System.out.println("新聞");
    }
}

Above code is very simple,and it works fine.But if I remove a single word '聞', Intellij Idea warn me:

����: ����GBK�IJ���ӳ���ַ�
        System.out.println("�?");

My Intellij edition information shows below:

IntelliJ IDEA 2020.1.1 (Community Edition)
Build #IC-201.7223.91, built on April 30, 2020
Runtime version: 11.0.6+8-b765.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1990M
Cores: 6
Non-Bundled Plugins: training

And I use Gradle 5.2.1 to build the project.

Hongyuan
  • 100
  • 6
  • What encoding are you using in IntelliJ? – mnestorov May 15 '20 at 09:28
  • My encoding using in IntelliJ is UTF-8,and my os encoding is gbk. – Hongyuan May 15 '20 at 09:35
  • 1
    @Hongyuan Most probably something is wrong with encoding. To make sure that you have configured it correctly check the answers: - https://stackoverflow.com/a/1082370/12844632 - https://stackoverflow.com/a/58886877/12844632 If everything is fine with that please create a new issue in [YouTrack](https://youtrack.jetbrains.com/issues/IDEA) and attach a compressed [logs folder](https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) after restarting the IDE and reproducing the problem. – Egor Klepikov May 21 '20 at 13:52

1 Answers1

0

Thank you, Egor Klepikov. Answer stackoverflow.com/a/58886877/12844632 works fine for me.

Hongyuan
  • 100
  • 6