wood burning stoves 2.0*
The moose likes JDBC and the fly likes Big5 display problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Big5 display problem" Watch "Big5 display problem" New topic
Author

Big5 display problem

Andee Weir
Greenhorn

Joined: Sep 13, 2002
Posts: 12
Hi everyone

We've got a very strange problem here. Our Oracle 8i database holds names in both UTF8 & Big5 (for chinese) together with a language column. We've written a JSP running on Websphere 4.0.1 which connects to the DB with a thin Oracle connection & retrieves the required name using the language of the logged on user (hope you're with me so far). If the language is Chinese it gets the converts the Big5 characters to UTF8 & then displays the result:-


When we run this on our Win2000 development App server it displays the correct Chinese characters but on our Solaris UAT system it doesn't. Both systems are connecting to the same Oracle DB.

After a bit of further investigation we've looked at the actual byte stream that is coming back from the DB :-

On UAT this comes back with :-
-62 -76 -62 -70 -62 -74 -62 -74 -61 -128 -61 -76 -62 -78 121 -62 -74 -61 -123 -62 -88 -61 -87 -62 -80 -61 -78 -62 -86 -61 -73 32 45 32 65 32 -62 -86 -61 -111 32 40 -62 -78 -61 -106 -62 -83 112 -62 -86 -61 -111 -62 -91 -61 -73 41

Whereas on dev we get :-
-76 -70 -74 -74 -64 -12 -78 121 -74 -59 -88 -23 -80 -14 -86 -9 32 45 32 65 32 -86 -47 32 40 -78 -42 -83 112 -86 -47 -91 -9 41

Why is this happening? Why are -61 & -62 bytes appearing on one but not the other? It's not the DB as the data is coming from the same same source in both cases. It's not the code as it is identical & we're using the same classes12.zip in both cases. Both systems have the same Websphere jvm settings. All we can think of is some environment setting which is different.

Thanks in advance for any help you might be able to provide as it is driving us crazy.

Andee
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

This type of problem always faced that things work on devlopment but not on UAT.

Just an advice to compare your DB parameter of both database !!!

select * from v%parameter

hope you find any thing
[ November 02, 2004: Message edited by: Shailesh Chandra ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Andee Weir
Greenhorn

Joined: Sep 13, 2002
Posts: 12
Thanks for the reply Shailesh but if I understand you correctly you're suggesting it's a setting on the db. I cannot see how this could be as both Dev & UAT are pointing to the same Oracle DB.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

I agree with you !!!

I just wanted to verify
if both application are pointing to same schema !!!
or database schema is different but database server instance is same.
[ November 02, 2004: Message edited by: Shailesh Chandra ]
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

just adding one more thing that In my environment I have to database server instance on one machine and their db parameters are different.
Andee Weir
Greenhorn

Joined: Sep 13, 2002
Posts: 12
Thanks for the help.

Eventually got to the solution. We changed Websphere's jvm classpath so that the path to classes12.zip appeared first. We also removed other older versions of classes12.zip (some were renamed) from the lib folder, restarted the app server & all was happy again.

Hope that helps someone else.

Thanks again.

Andee
 
Consider Paul's rocket mass heater.
 
subject: Big5 display problem
 
Similar Threads
100 times "hello world" without loop or recursive
http://xml.apache.org/axis/ HttpErrorCode:401
GZIP deflating response from server failure help!
AD LDS with DIGEST-MD5 can not connect
Problem in Jndi LooK up in Was6.1 for MySql Data Source