Re: Bug in UTF8-Validation Code?

From: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
To: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>, <andrew(at)supernews(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in UTF8-Validation Code?
Date: 2007-04-04 08:12:35
Message-ID: E1539E0ED7043848906A8FF995BDA57901E7B67A@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> What do others think? Should the argument to CHR() be a
> Unicode code point or the numeric representation of the
> database encoding?

When the database uses a single byte encoding, the chr function takes
the binary byte representation as an integer number between 0 and 255
(e.g. ascii code).
When the database encoding is one of the unicode encodings it takes a
unicode code point.
This is also what Oracle does.

Not sure what to do with other multibyte encodings.
Oracle only states that the numeric argument must resolve to one entire
code point,
whatever that is.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2007-04-04 08:34:52 Re: Bug in UTF8-Validation Code?
Previous Message Albe Laurenz 2007-04-04 07:40:02 Re: Bug in UTF8-Validation Code?