Re: Implementing full UTF-8 support (aka supporting 0x00)

From: Álvaro Hernández Tortosa <aht(at)8kdata(dot)com>
To: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
Cc: Kevin Grittner <kgrittn(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Implementing full UTF-8 support (aka supporting 0x00)
Date: 2016-08-03 19:36:26
Message-ID: 154e9300-a17b-2cb2-f032-3e036f94ee9c@8kdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/08/16 21:31, Geoff Winkless wrote:
> On 3 August 2016 at 20:13, Álvaro Hernández Tortosa <aht(at)8kdata(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Claudio Freire 2016-08-03 19:37:58 Re: Lossy Index Tuple Enhancement (LITE)
Previous Message Geoff Winkless 2016-08-03 19:31:49 Re: Implementing full UTF-8 support (aka supporting 0x00)