RE: [JDBC] Reading £ character from DB is displaying œ character

Поиск
Список
Период
Сортировка
От Jim Garrison
Тема RE: [JDBC] Reading £ character from DB is displaying œ character
Дата
Msg-id 0C723FEB5B4E5642B25B451BA57E27303EE04617@S1P5DAG3C.EXCHPROD.USA.NET
обсуждение исходный текст
Ответ на Reading £ character from DB is displaying œ character  (saisantoshi <mr@starsborn.com>)
Ответы RE: Reading £ character from DB is displaying œ character  (saisantoshi <mr@starsborn.com>)
Список pgsql-jdbc
> -----Original Message-----
> 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&characterEnco
> ding=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

What is the OS? What software is *displaying* the output? Is it an IDE? A terminal? If the terminal isn't UTF-8
capable,or there's some output encoding going on you could have perfectly valid data in the resultset and see it
corruptedon output to the console.
 

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: saisantoshi
Дата:
Сообщение: Reading £ character from DB is displaying œ character
Следующее
От: saisantoshi
Дата:
Сообщение: RE: Reading £ character from DB is displaying œ character