Re: Bug in UTF8-Validation Code? - Mailing list pgsql-hackers

From Zeugswetter Andreas ADI SD
Subject Re: Bug in UTF8-Validation Code?
Date
Msg-id E1539E0ED7043848906A8FF995BDA57901E7B67A@m0143.s-mxs.net
Whole thread Raw
In response to Re: Bug in UTF8-Validation Code?  ("Albe Laurenz" <all@adv.magwien.gv.at>)
List 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


pgsql-hackers by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Bug in UTF8-Validation Code?
Next
From: "Albe Laurenz"
Date:
Subject: Re: Bug in UTF8-Validation Code?