You might try and set the charset of the res.setContentType() method.
Depending on the encoding of the characters in your DB, try using
response.setContentType("text/plain; charset=UTF-8");
or
response.setContentType("text/plain; charset=UCS-2");
I think the default is ISO-8895-1 which is single byte.
regards,
Richard
At 11:14 AM 10/14/01 +0700, you wrote:
>Hello.
>
>I'm having problem writing JSP to read character from database which is in
>Thai. If I use
>ResultSet.getString() the unicode character will be converted to byte and
>all Thai character will be
>displayed as ??????. Could anyone please tell me hoe to solve this problem?
>
>Thank you very much.
>Kevin
>
>
>PS. I tried something like this but didn't work :
>
> Reader char_stream = rs.getCharacterStream("subject");
> char[] ch = new char[1];
> while(char_stream.read(ch) != -1) {
> out.print(ch);
>}
>
>Would character in ch be in unicode ? If it is when i use
>JspWriter.print() it will be converted
>into byte anyway, right?
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html