Reading £ character from DB is displaying œ character
От | saisantoshi |
---|---|
Тема | Reading £ character from DB is displaying œ character |
Дата | |
Msg-id | 1379825582068-5771897.post@n5.nabble.com обсуждение исходный текст |
Ответы |
RE: [JDBC] Reading £ character from DB is displaying œ character
|
Список | pgsql-jdbc |
Hi Everyone, I am trying to read to read a foreign character from database (Get *£*100) is giving some other character. I am using plain Java- JDBC connection. Just wondering if there is anything that needs to be done apart from the below? Below is the pseudo code: connection = DriverManager.getConnection( "jdbc:postgresql://127.0.0.1:5432/demodb?useUnicode=yes&characterEncoding=utf-8", "test", "test"); String sql = "select * from test_data"; ResultSet rs = stmt.executeQuery(sql); while(rs.next()){ System.out.println(rs.getString(1)) // Returns Get *œ*100 Expected : Get *£*100) } DB is UTF-8 Postgres jar version : postgresql-9.0-801.jdbc4.jar Appreciate if you could let me know if I am missing anything here? Thanks, Sai. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Reading-character-from-DB-is-displaying-character-tp5771897.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
В списке pgsql-jdbc по дате отправления: