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

From Mark Dilger
Subject Re: Bug in UTF8-Validation Code?
Date
Msg-id 46128474.5000507@markdilger.com
Whole thread Raw
In response to Re: Bug in UTF8-Validation Code?  ("Albe Laurenz" <all@adv.magwien.gv.at>)
List pgsql-hackers
Albe Laurenz wrote:
> What I suggest (and what Oracle implements, and isn't CHR() and ASCII()
> partly for Oracle compatibility?) is that CHR() and ASCII()
> convert between a character (in database encoding) and
> that database encoding in numeric form.

Looking at Oracle documentation, it appears that you get different 
behavior from CHR(X [USING NCHAR_CS]) depending on whether you call it 
with the argument USING NCHAR_CS.  Oracle 9i and higher have an 
additional function called NCHR(X) which is supposed to be the same as 
CHR(X USING NCHAR_CS).

On http://www.oraclehome.co.uk/chr-function.htm it says that "To use 
UTF8, you specify using nchar_cs in the argument list".  Does this mean 
that CHR(X) behaves as Tom Lane wants, and NCHR(X) behaves as Albe 
Laurenz wants?  Vice versa?

I'm not saying that Oracle compatibility is paramount.  But if we can 
get compatibility and a reasonable implementation at the same time, that 
seems like a bonus.

Once again, I don't have Oracle installed and cannot test this :(

mark


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: notification payloads
Next
From: Heikki Linnakangas
Date:
Subject: Re: notification payloads