Re: Implementing full UTF-8 support (aka supporting 0x00) - Mailing list pgsql-hackers

From Álvaro Hernández Tortosa
Subject Re: Implementing full UTF-8 support (aka supporting 0x00)
Date
Msg-id 154e9300-a17b-2cb2-f032-3e036f94ee9c@8kdata.com
Whole thread Raw
In response to Re: Implementing full UTF-8 support (aka supporting 0x00)  (Geoff Winkless <pgsqladmin@geoff.dj>)
Responses Re: Implementing full UTF-8 support (aka supporting 0x00)  (Geoff Winkless <pgsqladmin@geoff.dj>)
List pgsql-hackers

On 03/08/16 21:31, Geoff Winkless wrote:
> On 3 August 2016 at 20:13, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:
>> Yet they are accepted by Postgres
>> (like if Postgres would support Modified UTF-8 intentionally). The caracter
>> in psql does not render as a nul but as this symbol: "삀".
> Not accepted as valid utf8:
>
> # select E'\xc0\x80';
> ERROR:  invalid byte sequence for encoding "UTF8": 0xc0 0x80
>
> You would need a "modified utf8" encoding, I think.
>
> Geoff
    Isn't the correct syntax something like:

select E'\uc080', U&'\c080';

?
    It is a single character, 16 bit unicode sequence (see 
https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html).

    Álvaro

-- 

Álvaro Hernández Tortosa


-----------
8Kdata




pgsql-hackers by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: Implementing full UTF-8 support (aka supporting 0x00)
Next
From: Claudio Freire
Date:
Subject: Re: Lossy Index Tuple Enhancement (LITE)