Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8" - Mailing list pgsql-general

From Vivek Khera
Subject Re: Best practice for: ERROR: invalid byte sequence for encoding "UTF8"
Date
Msg-id 911DB9B5-0FE3-45AB-9AF8-A379D049447C@khera.org
Whole thread Raw
In response to Best practice for: ERROR: invalid byte sequence for encoding "UTF8"  ("Ivan Zolotukhin" <ivan.zolotukhin@gmail.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Customizing psql console to show execution times
Next
From: Decibel!
Date:
Subject: Re: Cluster and MVCC