oracle 如何让sql developer正确显示非英文字符而不是显示方块?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38067064/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 01:07:46  来源:igfitidea点击:

how to make sql developer display non-English character correctly instread of displaying squares?

oracleencodingutf-8oracle-sqldevelopernon-english

提问by actan

in sql developer--preference

在 sql 开发人员中--首选项

Environment--encoding is already set to 'UTF-8'

环境--编码已设置为“UTF-8”

Code Editor--fonts was set to 'Verdana'

代码编辑器--字体设置为“Verdana”

Database--NLS--Language was set to 'American'

数据库--NLS--语言设置为“美国”

The data in db was written by Java in UTF-8 encoding (95% percent sure)

db中的数据是Java写的UTF-8编码(95%确定)

What else I need to do to make it displayed correctly?

我还需要做什么才能使其正确显示?

Note: the squares characters are actually Chinese characters.

注意:方块字实际上是汉字。

enter image description here

在此处输入图片说明

采纳答案by actan

enter image description hereProblem solved. Using font 'Microsoft YaHei'

在此处输入图片说明问题解决了。使用字体“微软雅黑”

回答by Simon Clewer

sqldeveloper uses the system fonts from the host machine. On my Win8 system there is a font that has glyphs for very many unicode characters and thus works for many unicode characters.

sqldeveloper 使用来自主机的系统字体。在我的 Win8 系统上,有一种字体具有许多 unicode 字符的字形,因此适用于许多 unicode 字符。

'Arial Unicode MS'

'Arial Unicode MS'

Select this font from Tools-Preferences-Code Editor-Fonts

从工具-首选项-代码编辑器-字体中选择此字体

This string ( '照 ???????? ? ? ? 1 ? 灯' ) of widely varying characters works with 'Arial Unicode MS', they are displayed correctly in the editor window and the output window, thus

这个字符串( '照 ?????????? ? ? ? 1 ? 灯' )的变化很大的字符与 'Arial Unicode MS' 一起使用,它们在编辑器窗口和输出窗口中正确显示,因此

select n'照 ???????? ? ? ? 1 ? 灯' from dual; -- if data NLS_CHARACTERSET is single byte (eg 8859, ascii ... )
select '照 ???????? ? ? ? 1 ? 灯' from dual; -- multibyte db characterset.

I've checked many other available fonts in sqldeveloper, and most only have glyphs for a limited subset of the unicode characters, which seems a bit odd. For instance, 'courier new' on Putty has a massive range of glyphs, but Win8 / sqldeveloper 'courier new' does not do arabic, chinese etc.

我在 sqldeveloper 中检查了许多其他可用的字体,大多数只有有限的 unicode 字符子集的字形,这似乎有点奇怪。例如,Putty 上的 'courier new' 具有大量字形,但 Win8 / sqldeveloper 'courier new' 不支持阿拉伯语、中文等。

So, perhaps the thing to remember is that many fonts are stripped down subsets of what you might reasonably be expecting. Its not your fault, its the fonts - nearly all of them have a limited range of characters.

因此,也许要记住的是,许多字体都被剥离了您可能合理期望的子集。这不是你的错,是字体的错——几乎所有字体的字符范围都有限。

So use 'Arial Unicode MS'.

所以使用'Arial Unicode MS'。