> -----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.