unicode characters appear as question marks in IntelliJ IDEA console

后端 未结 8 2124
粉色の甜心
粉色の甜心 2020-12-11 15:26

I\'m trying to write unicode characters (♠) using System.out, and a question mark gets printed instead.

How can I have proper unicode characters displayed instead o

8条回答
  •  既然无缘
    2020-12-11 15:43

    System.out uses the default encoding of the underlying operating system which typically is ISO-8859-1 or UTF-8. The first is what I have with the 1252 codepage under XP.

    Is this in a CMD.EXE window, or inside an IDE?

提交回复
热议问题