Friday, June 9, 2017

NLS_LANG Settings in MS-DOS Mode and Batch Mode

NLS_LANG Settings in MS-DOS Mode and Batch Mode

When using Oracle utilities such as SQL*Plus, SQL Loader, Import, and Export in MS-DOS mode, the character set field of the NLS_LANG parameter for the session must first be set to the correct value.
This is required because MS-DOS mode uses, with a few exceptions, a different character set (or code-page), for example, OEM code-page, from Windows (ANSI code-page), and the default Oracle home NLS_LANG parameter in the registry is always set to the appropriate Windows code-page. If the NLS_LANG parameter for the MS-DOS mode session is not set appropriately, error messages and data can be corrupted due to incorrect character set conversion.
For Japanese, Korean, Simplified Chinese, and Traditional Chinese, the OEM code-page is identical to the ANSI code-page. In this case, there is no need to set the NLS_LANG in MS-DOS mode.
Similarly, in batch mode, set the correct character set value of the NLS_LANG by inserting a SET NLS_LANG command at the start of the batch procedure, according to the character set of the files to be processed in the procedure.
The following table lists the Oracle character sets that correspond to the OEM primary code-page in MS-DOS mode for each of the supported languages:


Language 

Character Set 

Arabic 

AR8ASMO8X 

Brazilian Portuguese 

WE8PC850 

Catalan  

WE8PC850 

Czech  

EE8PC852  

Danish  

WE8PC850  

Dutch  

WE8PC850  

English  

US8PC437 

Finnish  

WE8PC850  

French 

WE8PC850  

German 

WE8PC850  

Greek 

EL8PC737  

Hungarian 

EE8PC852  

Italian 

WE8PC850 

Japanese 

JA16SJIS 

Korean 

KO16KSC5601 

Latin American Spanish 

WE8PC850 

Norwegian 

WE8PC850  

Polish 

EE8PC852  

Portuguese  

WE8PC850 

Romanian 

EE8PC852  

Russian 

RU8PC866  

Simplified Chinese 

ZHS16GBK 

Slovak  

EE8PC852  

Slovenian  

EE8PC852 

Spanish 

WE8PC850  

Swedish 

WE8PC850  

Traditional Chinese 

ZHT16BIG5 

Turkish 

TR8PC857 

No comments:

Post a Comment