unicode characters appear as question marks in IntelliJ IDEA console

后端 未结 8 2136
粉色の甜心
粉色の甜心 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

    The settings are not configured correctly, make sure that the your File encodings are set to UTF-8, in particular the 'Default encoding properties files'. On my side the steps below didnt work until I changed the default encoding.

    On Intellij 2017.3.1 (Community Edition) File | Settings | Editor > File Encodings . Click on link below to see settings image

    Intellij 2017.3.1 (Community Edition)

提交回复
热议问题