Re: UTF8 with BOM support in psql

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: UTF8 with BOM support in psql
Date: 2009-11-18 04:22:34
Message-ID: 4B03768A.4050500@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro wrote:
> I don't want user to check the encoding of scripts before executing --
> it is far from fail-safe.
>
>
>

That's what we require in all other cases. Why should UTF8 be special?
If I have a script in Latin1 and Postgres thinks it's UTF8 it will
probably explode. Same for the reverse situation. Second-guessing the
user strikes me as being quite as dangerous as what you're trying to
cure, for all the reasons Tom outline earlier today. What is more, you
will teach Windows users to rely on the client encoding being set in
UTF8 scripts without their doing anything, and then when they get on
another platform they will not understand why it doesn't work because
the BOMs will be missing.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2009-11-18 04:24:51 Re: Syntax for partitioning
Previous Message Andrew Gierth 2009-11-18 04:21:35 Re: Timezones (in 8.5?)