How to use Special Chars in Java/Eclipse

后端 未结 7 1340
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 10:39

How can I use/display characters like ♥, ♦, ♣, or ♠ in Java/Eclipse?

When I try to use them directly, e.g. in the source code, Eclipse cannot save the file.

7条回答
  •  萌比男神i
    2020-12-01 11:14

    In Eclipse:

    1. Go to Window -> Preferences -> General -> Workspace -> TextFileEncoding
    2. Set it to UTF-8

提交回复
热议问题