Re: invalidly encoded strings - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: invalidly encoded strings
Date
Msg-id 46E5F617.3040807@dunslane.net
Whole thread Raw
In response to Re: invalidly encoded strings  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers

Tatsuo Ishii wrote:
>
> If you regard the unicode code point as simply a number, why not
> regard the multibyte characters as a number too? I mean, since 0xC2A9
> = 49833, "select chr(49833)" should work fine no?
>
>   

No. The number corresponding to a given byte pattern depends on the 
endianness of the architecture. That's exactly why we can't sanely use 
the byte pattern of the encoded characters as numbers.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: invalidly encoded strings
Next
From: Tatsuo Ishii
Date:
Subject: Re: invalidly encoded strings