> 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