InputStream and OutputStream Readers rely on platform default character
encodings (unless you specify an encoding in the constructor).
For example, a text file with German umlauts encoding in MacRoman translates
without any further effort when read on an OS X server and printed to an
ISO-8859-1 page. Move the text files onto a Windows box, and see the funny
characters.
Perhaps that's the problem?
Cheers,
Chris
on 9/17/03 9:00 AM, Hans Liebenberg at [EMAIL PROTECTED] wrote:
> 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:[EMAIL PROTECTED]
> Sent: Tuesday, September 16, 2003 9:04 AM
> To: Tomcat Users List; [EMAIL 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]