Re: getTables() doesn't handle umlauts correctly
От | Kris Jurka |
---|---|
Тема | Re: getTables() doesn't handle umlauts correctly |
Дата | |
Msg-id | alpine.BSO.2.00.1011230301020.26635@leary.csoft.net обсуждение исходный текст |
Ответ на | Re: getTables() doesn't handle umlauts correctly (Thomas Kellerer <spam_eater@gmx.net>) |
Ответы |
Re: getTables() doesn't handle umlauts correctly
|
Список | pgsql-jdbc |
On Mon, 22 Nov 2010, Thomas Kellerer wrote: > What I find irritating is that I can run SELECT or INSERT statements against > that table without problems. > > So the transmission of SQL Statements (through the Statement object) seems to > be working with a different encoding... As the discussion has shown, trying to determine who is at fault here is not trivial. The best way to show that postgresql (driver or server if you're seeing it in pgadmin too) is at fault is to create a test case creating the table and then querying the metadata. It would be helpful to use either a Java or PG escape code for the special character so it doesn't get mangled by either mail clients or build environments. Then use String.codePointAt to print out the actual data for both the table name used for construction and returned by the metadata. That would conclusively show that PG is at fault somewhere. Something like this untested code: void printString(String str) { for (int i=0; i<str.length(); ) { int cp = str.codePointAt(i); System.out.print(" " + cp); i += Character.charCount(cp); } System.out.println(); } Kris Jurka
В списке pgsql-jdbc по дате отправления: