Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Postgresql with JDBC - Client encoding issue

  Asked By: Preethi    Date: Oct 15    Category: Java    Views: 904
  

Hi,


In my project, we are using PostgreSQL jdbc driver for inserting data into db.
The values may contain other languages like Chinese, Japanese, German expressions.

Apart from inserting the English expression, am getting the following exceptions:

2012-10-11 02:41:37,589 [HttpClient-15] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 22P05
2012-10-11 02:41:37,589 [HttpClient-15] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 4 insert into summary (value, id, property) values ('Microsoft Windows 7 ??? ', '7', 'Name') was aborted. Call getNextException to see the cause.
2012-10-11 02:41:37,589 [HttpClient-15] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 22P05
2012-10-11 02:41:37,589 [HttpClient-15] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: character 0xe69797 of encoding "UTF8" has no equivalent in "WIN1252"

Please provide any suggestions

Thanks,
Preethi.raj

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Preethi Selvaraj     Answered On: Oct 16

I created my database as shown below and now i can able to insert any language string to database through jdbc.

CREATE DATABASE sample WITH ENCODING 'UTF8' TABLESPACE sampledb TEMPLATE=template0;

Thanks,
Preethi

 
Didn't find what you were looking for? Find more on Postgresql with JDBC - Client encoding issue Or get search suggestion and latest updates.
This post is locked for further answers.




Tagged: