muhammad umar
muhammad umar

Reputation: 11

Thai language Configuration in Oracle

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

Upvotes: 1

Views: 13068

Answers (2)

Wernfried Domscheit
Wernfried Domscheit

Reputation: 59456

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.

Upvotes: 0

Lalit Kumar B
Lalit Kumar B

Reputation: 49082

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

Upvotes: 0

Related Questions