This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 熟悉ORACLE 的DX 过来 看一下ORACLE 数据库表中有中文字符,用SQL PLUS 查询的时候,没法显示中文,该怎么解决。我是在中文2000 PROFESSIONAL 下的装的英文版的ORACLE ,版本号是8.17.
A B
---------- ----------
1 111
2 222
3 333
4 ?
4 ?
4 ?
4 ?
以上是查询时的结果,其中?是中文字符没法显示的结果。
-bobo123(bobo);
2003-5-1
{341}
(#1166391@0)
-
改字符集试试,hkey_local_machine/software/oracle->nls_lang:
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
-bluebluesky(bluebluesky);
2003-5-1
(#1166425@0)
-
试过了,不行
-bobo123(bobo);
2003-5-1
(#1166452@0)
-
If you have not set the character set or national character set as Simplified Chinese when creating database,you cannot store Chinese character in the database.
-laotang(aLonelyMan);
2003-5-1
(#1166920@0)
-
when I create a database, the system doesn't give me any tips about setting character.I use Database Configuration Assistant to create a database.
-bobo123(bobo);
2003-5-1
(#1166949@0)
-
不懂ORACLE. 但以前用DB2英文版可以支持中文, 就是所谓的GARBAGE IN, GARBAGE OUT. 只要插入和读出用相同的中文系统即可.
-wdding(wdding);
2003-5-1
(#1166967@0)
-
既然你肯定中文已经在ORACLE里面了,那没法显示会不会是SQL NET的问题?
-dundas888(登达寺);
2003-5-1
(#1166973@0)
-
我不能确定。不单是SQL NET 显示的问题,我直接在系统添加中文的记录,但添加进去的是乱码。我不知道,英文的ORACLE 是否能够支持中文,如果能支持,该怎么设置?
-bobo123(bobo);
2003-5-1
(#1167005@0)
-
My suggestion is to try it out using browser,but you need a servlet engine and write a JSP with JDBC to connect to your oracle. and select it out and present it in browser.
-zhao_e(zhao_e);
2003-5-1
{127}
(#1167085@0)
-
I have already tried it by using JSP , same result.http://65.95.181.130/test.jsp
-bobo123(bobo);
2003-5-1
{29}
(#1167102@0)
-
Maybe the data is corrupted, becauseHow did you load the Chinese data ?
If you are using a web browser to input Chinese Chars, it will be OK when you fetch them. However if you using MS word or other editors,
and using command line to insert the data. it's very likely the data is corrupted
-zhao_e(zhao_e);
2003-5-1
{257}
(#1167579@0)
-
请进。。无论你的ORACLE CS如何,(即使为US7ASCII),只要server side and client CS is same, then you should be OK for chinese char.
check server side:
select * from v$nls_parameters where parameter ='NLS_CHARACTERSET'
then before run SQL*PLUS, set env varible
NLS_LANG=x_y.z to the same as server side.
Then everything will be OK.
some tip about CS:
select dump(<column>) from <tab>;
-xordos(donothing);
2003-5-1
{390}
(#1167637@0)
-
client and server are in the same computer, I don't know where to set NLS_LANG, is it in regedit or other place. by the way, I have run sql statement as you say , the result is WE8ISO8859P1.
-bobo123(bobo);
2003-5-1
(#1168050@0)
-
under cmd.exe C:> input commands: 1) set NLS_LANG=AMERICAN_AMERICA.WE8ISO8858P1 2) sqlplus u/p@sid
-xordos(donothing);
2003-5-1
(#1168066@0)
-
查询视图nls_database_parameters 看database characterset 和 national characterset是否支持中文,若不支持重新创建数据库,选定制创建,其中有选字符集选项,选ZHS16GBK或其它类似ZHXXGBXX的
-miniboat(够级队长);
2003-5-2
(#1168084@0)
-
问题解决了,几个步骤就可以了。1、检查操作系统级Oracle汉字显示的字符集:运行regedit,定位到:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
找到以下字符串
NLS_LANG
检查是否以下内容,如不是,改之
SIMPLIFIED CHINESE_CHINA.ZHS16GBK
2、
进入SQL*PLUS
connect internal
update props$ set value$='ZHS16GBK
' where name='NLS_CHARACTERSET';
commit;
alter database ORCL character set ZHS16GBK;
alter database ORCL national character set ZHS16GBK;
commit;
-bobo123(bobo);
2003-5-2
{424}
(#1168156@0)
-
stop doing this on production database!!!! this may corrupt database.
to change character set, you need following oracle document instead of modifying core table directly.
-xordos(donothing);
2003-5-2
(#1168283@0)
-
来晚了,too easy.
-rror(斧头帮黄金左脚系统支);
2003-5-2
(#1168188@0)
-
还有一个问题请教你,关于JSP 和JAVA 数据库连接的问题,不知道你有没有接触过?
-bobo123(bobo);
2003-5-2
{783}
(#1168209@0)
-
1.you need set the classpath: weblogic.jar, where weblogic sets it as default. it is in weblogic_root/lib directory.
2. you can download the driver, then set it in your application.search "oracle" "classes12.zip" to know where you can get it.
-yuanzidan(原子弹);
2003-5-2
{65}
(#1168306@0)
-
谢谢!ROLIA 上高手真不少,都找到专业工作了没有?
-bobo123(bobo);
2003-5-2
(#1169067@0)