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

2

5

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.

enter image description here

Chekhov answered 28/6, 2016 at 4:26 Comment(2)
Use Tahoma Font instead of Verdana FontWithhold
Thanks @PirateX for reminding me this is really a font issue.Chekhov
C
7

enter image description here Problem solved. Using font 'Microsoft YaHei'

Chekhov answered 30/6, 2016 at 4:18 Comment(0)
F
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'.

Femoral answered 29/11, 2017 at 12:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.