Re: converting databases form SQL_ASCII to UTF8

From: Eric McKeeth <eldin00(at)gmail(dot)com>
To: Geoffrey Myers <geof(at)serioustechnology(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: converting databases form SQL_ASCII to UTF8
Date: 2011-04-22 16:46:51
Message-ID: BANLkTinYg586oQ2Hd8d3bpJ_rGimqugqtw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 22, 2011 at 9:16 AM, Geoffrey Myers
<geof(at)serioustechnology(dot)com>wrote:

> Vick Khera wrote:
>
> The database's enforcement of the encoding should be the last layer that
>> does so. Your applications should be enforcing strict utf-8 encoding from
>> start to finish. Once this is done, and the old data already in the DB is
>> properly encoded as utf-8, then there should be no problems switching on the
>> utf-8 encoding in postgres to get that final layer of verification.
>>
>
> Totally agree. Still, the question remains, why not leave it as SQL_ASCII?
>
>
Well, if your data is supposed to be UTF-8 encoded, then any of those
characters with invalid encoding in UTF-8 could reasonably be viewed as data
errors. Leaving the database in SQL-ASCII allows those errors to continue
accumulating, which will make a switch in the future even harder. If the
lack of being able to check encoding errors at the database level doesn't
bother you, and you're fine with risking bigger pain later in order to avoid
pain now, then I see no compelling reason to move away from SQL_ASCII.

-Eric

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SUBHAM ROY 2011-04-22 18:12:55 Re: Needs Suggestion
Previous Message Rob Sargent 2011-04-22 16:31:04 Re: converting databases form SQL_ASCII to UTF8