Skip site navigation (1) Skip section navigation (2)

Re: Bug in UTF8-Validation Code?

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bug in UTF8-Validation Code?
Date: 2007-04-03 00:58:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 2007-04-02, Mark Dilger <pgsql(at)markdilger(dot)com> wrote:
> Here's the code for the new chr() function:
>      if (pg_database_encoding_max_length() > 1 && !lc_ctype_is_c())

Clearly wrong - this allows returning invalid UTF8 data in locale C, which
is not an uncommon setting to use.

Treating the parameter as bytes is wrong too - it should correspond to
whatever the natural character numbering for the encoding is; for utf8
that is the Unicode code point.

Andrew, Supernews - individual and corporate NNTP services

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2007-04-03 01:02:17
Subject: Re: Modifying TOAST thresholds
Previous:From: ITAGAKI TakahiroDate: 2007-04-03 00:52:32
Subject: Re: CheckpointStartLock starvation

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group