Re: [v9.2] make_greater_string() does not return a string in some cases - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [v9.2] make_greater_string() does not return a string in some cases
Date
Msg-id CA+TgmobVjxK6DAuGHJ=nLgnfYHP4s7EAp19E86pzd4DudGhY4w@mail.gmail.com
Whole thread Raw
In response to Re: [v9.2] make_greater_string() does not return a string in some cases  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [v9.2] make_greater_string() does not return a string in some cases  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [v9.2] make_greater_string() does not return a string in some cases  (Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>)
List pgsql-hackers
On Mon, Oct 17, 2011 at 11:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> - Why does the second byte need special handling for 0xED and 0xF4?
>
> http://www.faqs.org/rfcs/rfc3629.html
>
> See section 4 in particular.  The underlying requirement is to disallow
> multiple representations of the same Unicode code point.

I'm still confused.  The input string is already known to be valid
UTF-8, so the second byte (if there is one) must be between 0x80 and
0xBF.  Therefore it will be neither 0xED nor 0xF4.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [v9.2] Object access hooks with arguments support (v1)
Next
From: Tatsuo Ishii
Date:
Subject: Re: spinlocks on HP-UX