Subject Re: Charactet Set problems, help?
Author momchilov
> Then print the characters you get from the database on the console
as
> integers. Something like:
>
> String myString = rs.getString(1);
> char[] chars = myString.toCharArray();
> for(int i = 0; i < chars.length; i++) {
> System.out.println("char[" + i + "] = " + (int)chars[i]);
> }
>
> If you get different character codes, then you ahve the problem with
> Tomcat/Servlet/JSP that incorrectly converts them.
>
> Roman

After this i get something like:

char[0] = 1045
char[1] = 1083
char[2] = 1077
char[3] = 1082
char[4] = 1090
char[5] = 1088
char[6] = 1086
char[7] = 1085
char[8] = 1085
char[9] = 1080
char[10] = 32
char[11] = 1082
char[12] = 1086
char[13] = 1084
char[14] = 1087
char[15] = 1086
char[16] = 1085
char[17] = 1077
char[18] = 1085
....
....

Sorry for the dummy question (this is my first project with
JSP/Tomcat), how to check if Tomcat/Servlet/JSP converts them
incorectly?

Thank you very much for the replies...