Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Character Set Issues (windows vs. Unix)

Hans Liebenberg

2003-09-17

Replies:

Hi Anton,

Thats exactly what I am doing. I have even tried

Reader reader = r.getCharacterStream("field_name");
and then printing out the the char values of the stream.... same result

Its the most bizarre thing i have seen.
...and driving me insane! :(

Thanks for you help

Hans



-----Original Message-----
From: Anton Tagunov [mailto:atagunov@(protected)]
Sent: Tuesday, September 16, 2003 9:04 AM
To: Tomcat Users List; hans@(protected)
Subject: Re: Character Set Issues (windows vs. Unix)


Hello Hans!

HL> When the application is installed on the windows server the particular
HL> character (which is some kind of spacing character in word) gets read
out of
HL> the database as
HL> Ascii code 160,

HL> BUT on the Linux server the exact same routine reads it as ascii code
65533

HL> Same database, same application config - only difference is OS

HL> The JVM's are both set up as default english installs.

Fun story ideed :-)
Are you sure you get it wron from ResultSet.getString()?

Try doing

String s = rs.getString(x);
char c = s.charAt(y);
out.print((int)c);

Are you getting different character codes?

Anton


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.