I use teradata and the below query outputs "Altlüd" when run using a teradata client.
select name as name from MYTABLE where selector=?
Whereas, I get "Altl?d" as the output when I try to execute the query using a java client(jdbc with teradata drivers). I am using "UTF-8" charset and I have also tried Latin charset with no luck.
I have also tried this to troubleshoot.
while (rs.next()) {
System.out.println(rs.getString(1));
Reader rd = rs.getCharacterStream(1);
int charr = rd.read();
while (charr >= 0) {
System.out.println(charr + " = " + ((char) charr));
charr = rd.read();
}
}
And the output is
Altl?dersdorf 65 = A 108 = l 116 = t 108 = l 65533 = ? 100 = d
If you look at the output produced, the int value for the spl character is 65533 which shouldn't be the case.
Infact it returns 65533 for all the special characters.
Any clues/pointers will be appreciated. Thanks!!!