From: | "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> |
---|---|
To: | "Zeugswetter Andreas ADI SD *EXTERN*" <ZeugswetterA(at)spardat(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:34:52 |
Message-ID: | AFCCBB403D7E7A4581E48F20AF3E5DB20203E424@EXADV1.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> 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.
Sorry, but this is *NOT* what Oracle does.
At least if we can agree that the code point for the Euro sign
is 0x20AC.
SQL> SELECT ASCII('EUR') AS DEC,
2 TO_CHAR(ASCII('EUR'), 'XXXXXX') AS HEX
3 FROM DUAL;
DEC HEX
---------- ----------------------------
14844588 E282AC
The encoding in this example is AL32UTF8, which corresponds to
our UTF8.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2007-04-04 08:39:40 | Vacuum in multi-statement |
Previous Message | Zeugswetter Andreas ADI SD | 2007-04-04 08:12:35 | Re: Bug in UTF8-Validation Code? |