最近改了一个Procedure 里面含有葡萄牙语,结果compile procedure后库中总是显示不对。这是因为我们有一个环境变量NLS_LANG没有设置对的缘故。
solution:
在linux端设置:setenv NLS_LANG PORTUGUESE_PORTUGAL.WE8MSWIN1252
同时在oracle sqldeveloper client端要设置:tools->preference->Database->NLS->PORTUGUESE
After the above steps, compile the procedure then you will find out that the procedure display correctly.
About NLS_LANG Parameters
Oracle provides Globalization Support that enables users to interact with a database in their own language, as defined by the NLS_LANG parameter. When you install Oracle Database Client components, Oracle Universal Installer sets the NLS_LANG parameter in the registry.
The locale setting of your operating system determines the value of the NLS_LANG parameter at installation. Table B-1 lists the operating system locale and NLS_LANG value mappings.
The NLS_LANG parameter is stored in the registry under the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEID\NLS_LANG subkey, where ID is the unique number identifying the Oracle home.
The NLS_LANG parameter uses the following format:
NLS_LANG = LANGUAGE_TERRITORY.CHARACTER_SET
for the NLS_LANG parameters values you can refer to below link
Commonly Used Values for NLS_LANG