Re: Encoding issue (utf8): different strings received from java than from PGAdmin
От | Albe Laurenz |
---|---|
Тема | Re: Encoding issue (utf8): different strings received from java than from PGAdmin |
Дата | |
Msg-id | AFCCBB403D7E7A4581E48F20AF3E5DB2020DE7F0@EXADV1.host.magwien.gv.at обсуждение исходный текст |
Ответ на | Encoding issue (utf8): different strings received from java than from PGAdmin ("Marc Mamin" <M.Mamin@intershop.de>) |
Ответы |
Re: Encoding issue (utf8): different strings received from java than from PGAdmin
|
Список | pgsql-jdbc |
> The PG Database, the PG Client and java allworks in UTF8 context. > > create this postgres function that just write the input > parameter in /opt/<pgdata>/pg_log/: > > CREATE OR REPLACE FUNCTION public.raisecode(v character varying) [...] > RAISE WARNING 'raisecode output: %',v; [...] > > 2) call "select raisecode('$§Kü§$')" > from a postgres client like PGAdmin > > 3) call the same statements from within a java application: > conn.createStatement().execute("select raisecode('$§Kü§$')"); > > compare the output in pg_log: > > 2 => $§Kü§$ > 3 => $çKüç$ I tried, but cannot reproduce your problem. Try to examine all the strings involved with 'od -c' and see where your results differ from mine: 'od -c' on my Test.java and Test.class contain: s e l e c t r a i s e c o d e ( ' $ 302 247 K 303 274 302 247 $ ' ) 'od -c' on my log file contains: r a i s e c o d e o u t p u t : $ 302 247 K 303 274 302 247 $ \n Is it the same for you? Yours, Laurenz Albe
В списке pgsql-jdbc по дате отправления: