unicode字符在IntelliJ IDEA控制台中显示为问号 [英] unicode characters appear as question marks in IntelliJ IDEA console

查看:3665
本文介绍了unicode字符在IntelliJ IDEA控制台中显示为问号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用System.out编写unicode字符(♠),并打印一个问号。

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

如何显示正确的unicode字符而不是问号?

How can I have proper unicode characters displayed instead of question marks?

我正在使用IntelliJ IDEA

I'm using IntelliJ IDEA on Windows, and trying to print from within the IDE.

推荐答案

文件编码是否正确配置?请参阅设置|文件编码使用UTF-8。打印♠对我有用,当我有IDE编码和所有文件设置为UTF-8。更改编码后可能需要重新编译。

Is the file encoding configured correctly? See that "Settings | File Encodings" uses UTF-8. Printing ♠ works for me when I have IDE encoding and all files set to UTF-8. Recompiling may be needed after changing the encoding.

这篇关于unicode字符在IntelliJ IDEA控制台中显示为问号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆