linux插入中文显示中文

NLS_LANG参数由以下部分组成:NLS_LANG=<Language>_<Territory>.<Clients Characterset>
export nls_lang=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
export nls_lang=AMERICAN_AMERICA.ZHS16GBK 与select userenv('language') FROM DUAL; 保持一致。


[handtest@tj-zsdt-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Sep 24 11:52:42 2019

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

SQL> select * from Chineset;

NAME
--------------
???????
???????

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[handtest@tj-zsdt-test ~]$ echo $NLS_LANG

[handtest@tj-zsdt-test ~]$ echo $NLS

[handtest@tj-zsdt-test ~]$ echo $LANG
en_US.UTF-8
[handtest@tj-zsdt-test ~]$ 

[handtest@tj-zsdt-test ~]$ export NLS_LANG=AMERICAN_AMERICA.UTF8
[handtest@tj-zsdt-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Sep 24 11:53:34 2019

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from Chineset;

NAME
------------------------------------------
中华人民共和国
中华人民共和国

SQL> INSERT INTO Chineset VALUES('中华人民共和国');

1 row created.

SQL> commit;

Commit complete.


SQL> select * from Chineset;

NAME
------------------------------------------
中华人民共和国
中华人民共和国
中华人民共和国

SQL> 
SQL> host echo $NLS_LANG
AMERICAN_AMERICA.UTF8

SQL> host echo $LANG
en_US.UTF-8

SQL> 


[handtest@tj-zsdt-test ~]$ export nls_lang=AMERICAN_AMERICA.ZHS16GBK
[handtest@tj-zsdt-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Sep 24 12:11:37 2019

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from Chineset;

NAME
------------------------------------------
中华人民共和国
中华人民共和国
中华人民共和国

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

[handtest@tj-zsdt-test ~]$ export nls_lang=AMERICAN_AMERICA.ZHS16GBK
[handtest@tj-zsdt-test ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Sep 24 12:15:40 2019

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> INSERT INTO Chineset VALUES('中华人民共和国');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from Chineset;

NAME
------------------------------------------
中华人民共和国
中华人民共和国
中华人民共和国
中华人民共和国

SQL> 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值