How to use Special Chars in Java/Eclipse

后端 未结 7 1323
被撕碎了的回忆
被撕碎了的回忆 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条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 11:32

    Windows Menu –> Preferences –> General (expand it) –> Workspace (click on it). Look for a box “Text File Encoding”. Default will be “Cp1252″. Change radio to select other and select “UTF-8″ from combo box.

提交回复
热议问题