convert(USING utf8_to_iso_8859_15) on Windows

From: "Pierre Thibaudeau" <pierdeux(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: convert(USING utf8_to_iso_8859_15) on Windows
Date: 2007-01-29 06:47:15
Message-ID: 74b035bb0701282247j3276f9b6g4651ff50f1aa6dae@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is this a documented phenomenon with the "convert" function? The first
result is what's expected:

SELECT convert('Gregoire' USING utf8_to_iso_8859_15);
"Gregoire"

But I don't understand the next result, when I put an acute accent over the
first "e":

SELECT convert('Grégoire' USING utf8_to_iso_8859_15);
""

(The output is an empty string.)

Likewise, whenever I enter a string containing non-ASCII characters, the
convert function outputs an empty string. Same results when I change the
conversion type from UTF8 to any other encoding which accepts those
non-ASCII characters... (When I try a conversion to an encoding that
doesn't accept the characters, I get an error message, and that's normal.)

My setup is as follows:
PostgreSQL 8.2.1 on WindowsXP
The database has UTF8 encoding.
SHOW lc_ctype; gives: "French_Canada.1252"

Is my problem related to Windows' lack of UTF8 support? I thought those
problems were solved with version 8.2...

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2007-01-29 08:37:35 PG Email Client
Previous Message Michael Fuhr 2007-01-29 05:15:04 Re: MULE_INTERNAL translation to win1250