Hello list!
I have searched the net, but didn't find a solution, so finally I'm writing
here - to the list!
I have encountered a problem with a KOI8-R encoding in Postgresql! The problem
is that, I cannot store Russian characters in database from JSP or servlets,
they are stored as ????? (i.e. substitutes each russian char to ?).
JSP and servlets work fine with KOI8-R, I can enter and display back russian
chars in KOI8-R from JSP and servlets. I use
request.setCharacterEncoding(response.getCharacterEncoding) in my servlets,
and contentType="text/html"; charset=KOI8-R in my JSP files, both of them
work fine with each other - russian chars are displayed normally.
Now, JDBC part!
When connecting to database, I set Connection properties of charSet=KOI8-R.
That is, props.setProperty("charSet","KOI8-R");
I use SQL_ASCII as a default encoding, but it is not a problem, I can store
russian chars from psql. I tried creating database with encoding 'KOI8-R',
but it did not solve a problem. Also, I tried setting properties of
encoding=KOI8-R, but it also did not make any changes!
The interesting part is that, when I insert russian chars from psql, they are
normally displayed on my JSP page. And it makes me think, that a problem is
in Java+Postgresql chain somewhere.
But, anyway, I didn't give up with this issue and I hope I will solve this
problem in short time. But now, I need your help and hints to make a move
forward! :)
I can't finish my project, because of this issue :) Actually, I have - it
works, but with English chars only!
Anyway, thank you very much and sorry for a time, taken!
--
Rgrds, .coder!