[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [HACKERS] Bug in UTF8-Validation Code?
From:       "Zeugswetter Andreas ADI SD" <ZeugswetterA () spardat ! at>
Date:       2007-04-04 8:12:35
Message-ID: E1539E0ED7043848906A8FF995BDA57901E7B67A () m0143 ! s-mxs ! net
[Download RAW message or body]


> 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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic