1

I have an issue regarding configuring Thai language in oracle (PL/SQL Developer). I have configured Thai language 'AMERICAN_AMERICA.TH8TISASCII' in regedit. Also I configured Environment variables in my computer. But still when I connect PL/SQL developer and retrieve data, columns that should show Thai descriptions are showing garbage data. Please help me.

Example of garbage data is '¿¿¿¿¿¿¿¿'

Oracle Configurations is as below : regedit->computer->HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->KEY_OraDB11g_home1

Windown Configuration is as below:

Mycomputer->Advanced system setting->Advanced System Settings->Environment Variables -> (here i added variable)

the same configuration is done by my peers and they got the configuration but i am not able to do this

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
muhammad umar
  • 11
  • 1
  • 1
  • 4
  • Welcome to Stack Overflow! Please [edit] your question to include some examples of the garbage data, if possible, as well as the specifics of how you configured those environment variables and your connection info. Thanks for improving the question's reference value and making it more answerable! – Nathan Tuggy Feb 23 '15 at 05:56
  • I have checked the issue.When i connect with Toad, thai is appearing fine but while connecting to PL/SQL developer i am facing the issue.Please help me find out this – muhammad umar Feb 23 '15 at 07:04

2 Answers2

0

I have configured Thai language 'AMERICAN_AMERICA.TH8TISASCII' in regedit.

It means you have configured your NLS_LANGUAGE as AMERICAN and NLS_TERRITORY as AMERICA. Which is wrong.

You should select the following:

NLS_LANGAUGE=THAI 
NLS_TERRITORY=THAILAND

You need to do this at:

  1. Database level - init.ora file
  2. Environment level - NLS LANG settings

I think your characterset is fine.

UPDATE OP got the issue with PL/SQL Developer tool.

You can enter "alter session" commands in the AfterConnect.sql file in the PL/SQL Developer installation directory. For example:

alter session set nls_date_format='dd-mm-yyyy'; alter session set nls_territory='THAILAND'; alter session set nls_language='THAI';

source

Lalit Kumar B
  • 47,486
  • 13
  • 97
  • 124
  • Can you please help me understand this.I have already made changes at Database level - init.ora file.but issue persists.I have added NLS_LANGAUGE=THAI NLS_TERRITORY=THAILAND in this file.But issue is there.But also please help me in configuring 2.Environment level - NLS LANG settings .Where can i do that. – muhammad umar Feb 23 '15 at 06:36
  • Thai language is appearing fine when connect with Toad but while connecting with PL/SQL Developer thai is showing garbage.Please help – muhammad umar Feb 23 '15 at 07:21
  • Lalit sir, but i added script in afterconnect file but sill its the same.I dont know what exactly is happeing.Toad is just fine but PL/SQL is troubling – muhammad umar Feb 23 '15 at 08:08
  • Should i reinstall PL SQL Developer ? I am using version 8.0.0.1480 01.2061660864 – muhammad umar Feb 23 '15 at 08:25
  • If you are saying TOAD is fine but PL/SQL Developer has issues. Then you are spot on that the issue is only with PL/SQL Developer NLS settings. I gave you all the information you need, you just need to fix it in PL/SQL Developer. I don't have the tool to check, however, see if you find anything useful here https://lalitkumarb.wordpress.com/2014/08/14/plsql-developer-settings/ I would insist, check from `SQL*Plus`. If you are able to see Thai in SQL*PLus, then the problem is with PL/SQL Developer tool. – Lalit Kumar B Feb 23 '15 at 08:25
  • `NLS_LANGUAGE` and `NLS_TERRITORY` should not influence your character set and character display. `NLS_LANGUAGE` mainly defines the language of Oracle error messages and sorting options. `NLS_TERRITORY` is used to define defaults of calender settings (e.g. first day of week) or default currency symbol. – Wernfried Domscheit Feb 23 '15 at 10:42
0

I assume your selected font in PL/SQL Developer does not support Thai characters. Try this command to check:

SELECT UNISTR('Kho Khuat: \0E03') FROM DUAL;

Do you get proper output like this?

Kho Khuat: ฃ

If not, you should select a font which support Thai characters. You can use this page FileFormat.info to check which font supports your character.

Value for NLS_LANG should match your local environment settings, not the setting from Database. By this all characters are properly translated in SQL communication.

Check you local environment with this command:

c:\>reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage /v ACP

In my case it is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
    ACP    REG_SZ    1252

So, my NLS_LANG should be set to .WE8MSWIN1252 or something similar.

However, this is only valid if your application (SQL Developer in your case) uses the default encoding settings from Windows. In some applications you can change that - typically you can switch between local codepage and Unicode (UTF-8). In this case you must modify NLS_LANG accordingly.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • Font may not be the issue.It seems to me rights issue.When i log through administrator then thai is appearing properly in PL/SQL but when log through my own user then PL/SQL developer is showing garbage.Please suggest how can i assign any specific rights to my user – muhammad umar Feb 23 '15 at 13:10