1.查询服务器端配置的字符集。在sqlplus中以dba用户执行: select tab1.aa||'_'||tab2.bb||'.'||tab3.cc from (select VALUE$ aa from sys.props$ where name='NLS_LANGUAGE')tab1,(select VALUE$ bb from sys.props$ where name='NLS_ISO_CURRENCY')tab2,(select VALUE$ cc from sys.props$ where name='NLS_CHARACTERSET')tab3;
另外你的应用的通过什么实现的,应用的字符集也是要和数据库的字符集设置成一致的,这样才能在程序中正确显示字符;
select tab1.aa||'_'||tab2.bb||'.'||tab3.cc from (select VALUE$ aa from sys.props$ where name='NLS_LANGUAGE')tab1,(select VALUE$ bb from sys.props$ where name='NLS_ISO_CURRENCY')tab2,(select VALUE$ cc from sys.props$ where name='NLS_CHARACTERSET')tab3;
2.在客户端的注册表HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->HOME0中,如无系统变量NLS_LANG,则“新建”->“字符串”,重命名为“NLS_LANG”,并赋值为上述查询变量的值(注意引号内的字符应大写),再查看时不需要重启Oracle。