xp oracle 字符集,【字符集】处理Toad显示乱码及Windows XP下无法插入“某些汉字”问题...

,是与数据库Server端保持一致的,虽然这样设置不会发生转码的现象,但是在Windows的cmd环境下会出现“一些汉字”(大部分可以)汉字无法录入的问题,现象如下:C:\>sqlplus sec/sec@DB_AL32UTF8SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 23 10:57:21 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit ProductionWith the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine optionssec@ora10g> drop table t purge;Table dropped.sec@ora10g> create table t (x varchar2(10 char));Table created.sec@ora10g> insert into t values ('侯');ERROR:ORA-01756: quoted string not properly terminated这只是一个影响,另外一个著名的影响就是加中文comments的时候也报这样的错误sec@ora10g> comment on table t is '侯';ERROR:ORA-01756: quoted string not properly terminatedOK,问题现象描述清楚了,下面我们修改NLS_LANG参数为AMERICAN_AMERICA.ZHS16GBK,也就是保持和XP系统的字符集一致。注意:需要重新进入以下SQLPLUS环境C:\>sqlplus sec/sec@DB_AL32UTF8SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 23 11:05:07 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit ProductionWith the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine optionssec@ora10g> insert into t values ('侯');1 row created.sec@ora10g> comment on table t is '侯';Comment created.sec@ora10g> col DUMP(X) for a30sec@ora10g> select x,dump(x) from t;X                    DUMP(X)-------------------- ------------------------------侯                   Typ=1 Len=3: 228,190,175效果非常的明显吧,dump后的结果也很清楚的表名,“侯”这个字已经被“转码”到AL32UTF8格式的了。6.小结通过这个实验我们妥善处理了两个实际问题,如果您没有遇到过,恭喜您,您很幸运。1)Toad显示字符乱码问题2)Windows XP环境或Toad环境下无法插入“某些汉字”和comments的问题secooler

09.09.23-- The End --

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值