oracle前台显示乱码问题,oracle 模拟字符集乱码中文显示'靠'的问题(原创)

以前遇到过朋友说数据库里都是‘靠靠’,这也是一个经典的字符集问题,今天 想还原那个问题,操作如下

----------begin----------

环境:oracle 安装服务器为192.168.3.229 (以下称server)linux

客户端操作192.168.3.243(以下称client)linux

先在server制造数据

SQL> create table test (id int,name varchar(20));

Table created.

SQL> insert into test values(1,'我是谁');

1 row created.

SQL> commit;

Commit complete.

SQL> exit

好了下面全在client上操作

[oracle@orazhang ~]$ sqlplus sys/oracle@192.168.3.229:1528/orcl as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 11 09:41:40 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set linesize 200

SQL> set wrap off

SQL> select * from nls_database_parameters;

PARAMETER                      VALUE

------------------------------ --------------------------------------------------------------------------------

NLS_LANGUAGE                   AMERICAN

NLS_TERRITORY                  AMERICA

NLS_CURRENCY                   $

NLS_ISO_CURRENCY               AMERICA

NLS_NUMERIC_CHARACTERS         .,

NLS_CHARACTERSET               ZHS16GBK

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@orazhang ~]$ export LANG='Simplified Chinese_china.ZHS16GBK'

---修改OS字符集

[oracle@orazhang ~]$ echo $LANG

Simplified Chinese_china.ZHS16GBK

[oracle@orazhang ~]$ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1

--修改客户端字符集

[oracle@orazhang ~]$ sqlplus sys/oracle@192.168.3.229:1528/orcl as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 11 09:41:40 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from test;

ID NAME

---------- --------------------

1 靠?

--显示成功

--------------END----------------

放心nls_lang\\lang 值操作系统重启后就会还原,也可以手动修改回原来显示正常

转载请写名出处:网址

「喜欢文章,快来给作者赞赏墨值吧」 赞赏

【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

请登录后发表评论

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值