Re: UTF8 with BOM support in psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UTF8 with BOM support in psql
Дата
Msg-id 28242.1256053891@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UTF8 with BOM support in psql  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: UTF8 with BOM support in psql  (Magnus Hagander <magnus@hagander.net>)
Re: UTF8 with BOM support in psql  (David Christensen <david@endpoint.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> What I think we might sensibly do is to eat the leading BOM of an SQL 
> file iff the client encoding is UTF8, and otherwise treat it as just 
> bytes in whatever the encoding is.

That seems relatively non-risky.

> Should we also do the same for files passed via \copy? What about 
> streams on stdin? What about files read from the backend via COPY?

Not thrilled about doing this on stdin --- you have no good
justification for assuming that start of stdin corresponds to a file
boundary somewhere.  COPY files, maybe.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Could postgres be much cleaner if a future release skipped backward compatibility?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Controlling changes in plpgsql variable resolution