Re: UTF8 with BOM support in psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: UTF8 with BOM support in psql
Date
Msg-id 1442.1258480912@sss.pgh.pa.us
Whole thread Raw
In response to Re: UTF8 with BOM support in psql  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: UTF8 with BOM support in psql
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Peter Eisentraut wrote:
>> Well, someone could implement UTF-16 or UTF-whatever as client encoding.
>> But I have not heard of any concrete proposals about that.

> Doesn't the nul byte problem make that seriously hard?

Just about impossible.  It would require a protocol bump, and removal of
C-style string usage *everywhere* on the client side.

Again, this is something that might be more feasible with encoding
conversion inside psql --- translating UTF16 to UTF8 immediately upon
reading it from any external file would confine the problem to possibly
manageable bounds.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: actualised funcs typmod patch
Next
From: Andrew Dunstan
Date:
Subject: Re: UTF8 with BOM support in psql