Re: PLPERL function error - utf-8 to iso8859-1

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: "Tom Lane <tgl" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PLPERL function error - utf-8 to iso8859-1
Date: 2003-10-15 14:35:25
Message-ID: OF01DBCD51.20174946-ON88256DC0.004FB0EE-88256DC0.0050CE88@fds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Ah there in lies the problem. I have my database encoding set to LATIN1
and I have this value stored in my table and can even write SQL to search
against it:
select *
from mdc_products
where description ~* '?'

Patrick Hatcher
Macys.Com
Legacy Integration Developer
415-422-1610 office
HatcherPT - AIM


Tom Lane
<tgl(at)sss(dot)pgh(dot)p To: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
a.us> cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PLPERL function error - utf-8 to iso8859-1
10/14/2003
09:07 PM

"Patrick Hatcher" <PHatcher(at)macys(dot)com> writes:
> Trying to create a plperl function to strip non-friendly mainframe
> characters from a string. However, when I try to add the Trademark
symbol
> (â"¢) as a replace criteria, PG spits back an error:
> ERROR: Could not convert UTF-8 to ISO8859-1

AFAICT this means that the trademark symbol is not in the character set
that you've specified to be used in the database; accordingly there's no
need to try to prevent it from being stored...

Perhaps you should have selected the database encoding to be the same as
what you're using on the client side.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-10-15 14:36:31 Re: Transaction Queries!!!
Previous Message Alvaro Herrera 2003-10-15 14:28:57 Re: Cygwin? or paid version from SRA?