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

From Albe Laurenz
Subject Re: Bug in UTF8-Validation Code?
Date
Msg-id AFCCBB403D7E7A4581E48F20AF3E5DB2020DE687@EXADV1.host.magwien.gv.at
Whole thread Raw
In response to Re: Bug in UTF8-Validation Code?  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
Martijn van Oosterhout wrote:
> So your implemntation is simply:
> 1. Take number and make UTF-8 string
> 2. Convert it to database encoding.

Aah, now I can spot where the misunderstanding is.
That's not what I mean.

I mean that chr() should simply 'typecast' to "char".

So when the database encoding is UTF8, I want
chr(14844588) to return a Euro sign, and when the encoding
is LATIN9, then chr(14844588) should either yield the 'not'
sign (UNICODE 0xAC) or an error message, depending on whether
we want chr() to operate mod 256 like Oracle has it for
single byte character sets or not, while chr(164) should
return the Euro sign for LATIN9 database encoding.

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: Suresh
Date:
Subject: Postgres optimizer
Next
From: "Marko Kreen"
Date:
Subject: Re: What X86/X64 OS's do we need coverage for?