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

柔情痞子 提交于 2019-12-31 00:59:13

问题


in sql developer--preference

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

Code Editor--fonts was set to 'Verdana'

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

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

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

Note: the squares characters are actually Chinese characters.


回答1:


Problem solved. Using font 'Microsoft YaHei'




回答2:


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.

'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

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.

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'.



来源:https://stackoverflow.com/questions/38067064/how-to-make-sql-developer-display-non-english-character-correctly-instread-of-di

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!