Re: pl/perl and utf-8 in sql_ascii databases

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: badalex <badalex(at)gmail(dot)com>, cb <cb(at)df7cb(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/perl and utf-8 in sql_ascii databases
Date: 2012-06-21 20:43:07
Message-ID: 1340311355-sup-5183@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Excerpts from Kyotaro HORIGUCHI's message of jue jun 21 08:02:58 -0400 2012:
>
> Ouch!
>
> > # UtfToLocal() seems to have a bug that always report illegal
> > # encoding was "UTF8" regardless of the real encoding. But
> > # plper_lc_*.(sql|out) increases if the bug is fixed.
>
> This is not a bug. The error message "invalid byte sequence for
> encoding "UTF8"" meant "invalid INPUT byte sequence as encoding
> "UTF8"" not encoding for output.. So the regtest patch covers all
> of possible patterns - UTF8 and SQL_ASCII..

Right, that confused me too for a while.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-06-21 20:47:12 Re: pl/perl and utf-8 in sql_ascii databases
Previous Message Alvaro Herrera 2012-06-21 19:47:09 Re: foreign key locks