Thread: Problem : Japanese Character Support
Hello, I have one problem. I am working on java and postgre sql. The data in postgre sql is in japanese When i used JDBC code in java like select statement then i get the resultset but in that resultset instead of japanese data , empty string is coming so i am not getting japanese data in java from postgre sql. Its not giving error but return empty string. But, when i used english data, its working fine What could be the problem? Is it that postgre's JDBC driver is not supporting japanese character. Waiting for early reply. Rashmi
On Sat, 15 Jan 2005, Rashmi wrote: > What could be the problem? Is it that postgre's JDBC driver is not > supporting japanese character. > The JDBC driver has no problem with Japanese characters. You must have a database that supports it. What encoding is your database in? Kris Jurka
"Rashmi" <rashmi 'at' fideltech.com> writes: > Hello, > > I have one problem. I am working on java and postgre sql. The data in > postgre sql is in japanese > When i used JDBC code in java like select statement then i get the > resultset but in that resultset instead of japanese data , empty > string is coming so i am not getting japanese data in java from > postgre sql. > Its not giving error but return empty string. But, when i used english > data, its working fine > > What could be the problem? > Is it that postgre's JDBC driver is not supporting japanese character. Using both postgres 7.2 and 7.4 I had no problem at all mixing any type of language (currently tested english, french and japanese on the same page). I have set the database in UTF-8 at creation time. I use UTF-8 back and forth in my webapp (which uses struts). -- Guillaume Cottenceau
Read this page. http://www.postgresql.org/docs/current/static/multibyte.html I think at some versions it was possible to specify the character encoding in the JDBC URL like this jdbc:postgresql://192.168.0.1/antony?charSet=LATIN1 rgds Antony Paul On 17 Jan 2005 12:57:47 +0100, Guillaume Cottenceau <gc@mnc.ch> wrote: > "Rashmi" <rashmi 'at' fideltech.com> writes: > > > Hello, > > > > I have one problem. I am working on java and postgre sql. The data in > > postgre sql is in japanese > > When i used JDBC code in java like select statement then i get the > > resultset but in that resultset instead of japanese data , empty > > string is coming so i am not getting japanese data in java from > > postgre sql. > > Its not giving error but return empty string. But, when i used english > > data, its working fine > > > > What could be the problem? > > Is it that postgre's JDBC driver is not supporting japanese character. > > Using both postgres 7.2 and 7.4 I had no problem at all mixing > any type of language (currently tested english, french and > japanese on the same page). I have set the database in UTF-8 at > creation time. I use UTF-8 back and forth in my webapp (which > uses struts). > > -- > Guillaume Cottenceau > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend >
Kris Jurka <books 'at' ejurka.com> writes: > The JDBC driver has no problem with Japanese characters. You must have a > database that supports it. What encoding is your database in? Kris: is there any reason why not always using unicode while creating databases on Linux (I've read that unicode is not supported on Windows)? That way, all characters would be supported. -- Guillaume Cottenceau