Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8"

Поиск
Список
Период
Сортировка
От Vivek Khera
Тема Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8"
Дата
Msg-id 911DB9B5-0FE3-45AB-9AF8-A379D049447C@khera.org
обсуждение исходный текст
Ответ на Best practice for: ERROR: invalid byte sequence for encoding "UTF8"  ("Ivan Zolotukhin" <ivan.zolotukhin@gmail.com>)
Список pgsql-general
On Aug 15, 2007, at 7:41 AM, Ivan Zolotukhin wrote:

> What is the best practice to process such a broken strings before
> passing them to PostgreSQL? Iconv from utf-8 to utf-8 dropping bad
> characters?

This rings of GIGO... if your user enters garbage, how do you know
what they wanted?  You don't.  You tell them they entered garbage,
else the result will be garbage.  Data validation... learn from
microsoft's mistakes :-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Customizing psql console to show execution times
Следующее
От: Decibel!
Дата:
Сообщение: Re: Cluster and MVCC