From: Craig Ringer <craig@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: PostgreSQL fails to convert decomposed utf-8 to other encodings
Date: Wed, 06 Aug 2014 12:12:05 +0800
Message-ID: <53E1AB15.8050702@2ndquadrant.com> (raw)
In-Reply-To: <53E1A6F8.1000104@2ndquadrant.com>
References: <53E179E1.3060404@2ndquadrant.com>
<1523.1407287675@sss.pgh.pa.us>
<53E1A6F8.1000104@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 08/06/2014 11:54 AM, Craig Ringer wrote:
> On 08/06/2014 09:14 AM, Tom Lane wrote:
>> We don't actually support "decomposed" utf8; if there is any bug here,
>> it's that the input you show isn't rejected. But I think there was
>> some intentional choice to not check \u escapes fully.
>
> Combining characters (i.e. decomposed utf-8 form, for chars where there
> is a combined equivalent) are part of utf-8. They're not an optional add-on.
... though we can advertise partial Unicode support, saying that we
support UTF-8 for UCS (ISO 10646-1:2000 Annex D / RFC 3629)
implementation level 1 only, requiring Normalization Form C (NFC) input.
Given that Pg doesn't seem to understand \xf8 or \xfc utf-8 chars, so it
doesn't cover the full utf-8 range, it doesn't look like it meets Level
1 either. So it supports "mostly-utf8".
With level 1 we should really _reject_ combining chars, but can't do
that w/o breaking BC.
I guess I should turn this:
http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
into a regression test.
Possibly also parts of this:
http://www.columbia.edu/~fdc/utf8/
though it's more oriented toward rendering.
It's worth noting that Konsole and Thunderbird had no issues with
combining chars when I was testing this.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: craig@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: PostgreSQL fails to convert decomposed utf-8 to other encodings
In-Reply-To: <53E1AB15.8050702@2ndquadrant.com>
References: <53E179E1.3060404@2ndquadrant.com> <1523.1407287675@sss.pgh.pa.us> <53E1A6F8.1000104@2ndquadrant.com> <53E1AB15.8050702@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox