Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U473L-0004cX-IL for pgsql-jdbc@arkaria.postgresql.org; Sat, 09 Feb 2013 09:48:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U473K-0000LX-K4 for pgsql-jdbc@arkaria.postgresql.org; Sat, 09 Feb 2013 09:48:58 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U473J-0000LR-MZ for pgsql-jdbc@postgresql.org; Sat, 09 Feb 2013 09:48:57 +0000 Received: from mxout004.mail.hostpoint.ch ([2a00:d70:0:e::324]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U473G-0000oE-Bx for pgsql-jdbc@postgresql.org; Sat, 09 Feb 2013 09:48:56 +0000 Received: from [10.0.2.20] (helo=asmtp002.mail.hostpoint.ch) by mxout004.mail.hostpoint.ch with esmtp (Exim 4.72 (FreeBSD)) (envelope-from ) id 1U473B-000BgE-Kh; Sat, 09 Feb 2013 10:48:49 +0100 Received: from [46.14.48.42] (helo=laurentTHINK) by asmtp002.mail.hostpoint.ch with esmtpa (Exim 4.72 (FreeBSD)) (envelope-from ) id 1U473A-000HCr-QA; Sat, 09 Feb 2013 10:48:49 +0100 X-Authenticated-Sender-Id: laurent.schweizer@peoplefone.com From: "Laurent Schweizer" To: "'Dave Cramer'" , "'Kevin Grittner'" Cc: References: In-Reply-To: Subject: =?iso-8859-1?Q?RE:_=5BJDBC=5D_Re:_=5BJDBC=5D_Re:_=5BJDBC=5D_=E9_convert?= =?iso-8859-1?Q?ed_in_=C3=28c=29?= Date: Sat, 9 Feb 2013 10:48:54 +0100 Message-ID: <004201ce06aa$ad15b110$07411330$@peoplefone.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0043_01CE06B3.0EDCD830" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQMHPk9V4osRkwpex7siiM6wQqsprJX+1+Mg Content-Language: fr-ch X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multipart message in MIME format. ------=_NextPart_000_0043_01CE06B3.0EDCD830 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I think that I=92m correct with the client encoding as the =93SHOW client_encoding=94 return UTF8 no ? =20 Laurent =20 De : pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] De la part de Dave Cramer Envoy=E9 : samedi 9 f=E9vrier 2013 00:01 =C0 : Kevin Grittner Cc : Laurent Schweizer; pgsql-jdbc@postgresql.org Objet : [JDBC] Re: [JDBC] Re: [JDBC] =E9 converted in =C3(c) =20 The JDBC driver only knows one encoding. Are you using it to retrieve = the data as well ? Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca =20 On Fri, Feb 8, 2013 at 5:52 PM, Kevin Grittner = wrote: Laurent Schweizer wrote: > I have an issue with special character like =E9. > I have as server postgres 9.2, I have created a new DB , encoding > utf8 =20 > > Client is a very simple test class that: > 1) update a varchar value > 2) read the same value and print them > > If I update the varchar with a special character like =93=E9=94 the > value in the DB is correct ( I check them with another software ) > but when I read them from my simple java class the value is not > correct and the =E9 is converted in =C3=A9 > > I have added to the connection string the option: > ?useUnicode=3Dtrue&characterEncoding=3Dutf8 > > And if I do a : "SHOW client_encoding;=94 I get UTF8 It is behaving as though the client is using a character encoding other than UTF8 -- some sort of 8-bit encoding, probably. You must set client_encoding to match. -Kevin -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc =20 ------=_NextPart_000_0043_01CE06B3.0EDCD830 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

I think that I’m correct with the=A0 client encoding as the = “SHOW client_encoding” return UTF8 = no ?

 

Laurent

 

De : = pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] = De la part de Dave Cramer
Envoy=E9 : samedi 9 = f=E9vrier 2013 00:01
=C0 : Kevin = Grittner
Cc : Laurent Schweizer; = pgsql-jdbc@postgresql.org
Objet : [JDBC] Re: [JDBC] Re: = [JDBC] =E9 converted in =C3(c)

 

The = JDBC driver only knows one encoding. Are you using it to retrieve the = data as well ?


Dave = Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

 

On Fri, Feb 8, 2013 at 5:52 PM, Kevin Grittner <kgrittn@ymail.com> wrote:

Laurent Schweizer = <laurent.schweizer@people= fone.com> wrote:

> I have an issue with special = character like =E9.

> I have as server postgres 9.2, I have = created a new DB , encoding
> utf8  
>
> Client = is a very simple test class that:
> = 1)      update  a varchar value
> = 2)      read the same value and print = them
>
> If I update the varchar with a special character = like “=E9”  the
> value in the DB is correct ( I = check them with another software )
> but when I read them from my = simple java class  the value is not
> correct and the =E9 is = converted in =C3=A9
>
> I have added to the connection = string the option:
> = ?useUnicode=3Dtrue&characterEncoding=3Dutf8
>
> And if I = do a : "SHOW client_encoding;” I get  = UTF8

It is behaving as though = the client is using a character encoding
other than UTF8 -- some sort = of 8-bit encoding, probably.  You must
set client_encoding to = match.

-Kevin


--
Sent via pgsql-jdbc = mailing list (pgsql-jdbc@postgresql.org)<= /span>
To make changes to your = subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

 

------=_NextPart_000_0043_01CE06B3.0EDCD830--