From: | "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> |
---|---|
To: | "Marc Mamin *EXTERN*" <M(dot)Mamin(at)intershop(dot)de>, <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Encoding issue (utf8): different strings received from java than from PGAdmin |
Date: | 2007-04-06 07:39:04 |
Message-ID: | AFCCBB403D7E7A4581E48F20AF3E5DB2020DE7F0@EXADV1.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Bellur Ashwin | 2007-04-06 16:57:12 | Problem with Running Query |
Previous Message | Marc Mamin | 2007-04-05 14:48:41 | Encoding issue (utf8): different strings received from java than from PGAdmin |