4

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

Saikat
  • 8,190
  • 12
  • 69
  • 94
actan
  • 367
  • 2
  • 5
  • 15

2 Answers2

3

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

actan
  • 367
  • 2
  • 5
  • 15
1

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

Simon Clewer
  • 171
  • 2
  • 4