Re: BUG #5010: perl iconv function returns ? character

From: Lampa <lampacz(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5010: perl iconv function returns ? character
Date: 2009-09-06 05:20:49
Message-ID: 9aef75b10909052220r6fde28fer308aa254dcf52d13@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Cluster is created with cs_CZ.UTF-8 collation.

List of databases
Name | Owner | Encoding | Collation | Ctype |
Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | cs_CZ.UTF-8 | cs_CZ.UTF-8 |
template0 | postgres | UTF8 | cs_CZ.UTF-8 | cs_CZ.UTF-8 | =c/postgres
:
postgres=CTc/postgres
template1 | postgres | UTF8 | cs_CZ.UTF-8 | cs_CZ.UTF-8 | =c/postgres
:
postgres=CTc/postgres
(3 rows)

2009/9/6 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Aug 25, 2009 at 8:15 AM, Lampa<lampacz(at)gmail(dot)com> wrote:
>>> function my_ascii2 is defined:
>>> CREATE FUNCTION my_ascii2(text) RETURNS text AS $$ use strict; use
>>> Text::Iconv; my $conv = Text::Iconv->new("UTF8", "ASCII//TRANSLIT"); return
>>> $conv->convert($_[0]); $$ LANGUAGE plperlu;
>>>
>>> 8.3.x version works perfectly, 8.4.0 problem
>
>> I can't reproduce this on 8.4.0 or CVS HEAD.  I think that whatever
>> problem you have here is not a PostgreSQL bug.
>
> I suspect that function will only work as desired in a database with
> UTF8 server_encoding.  Maybe the problem is the 8.4 database is set up
> with some other encoding?
>
>                        regards, tom lane
>

--
Lampa

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Paragon Corporation 2009-09-06 09:39:18 Re: BUG #5007: could not reattach to shared memory
Previous Message Tom Lane 2009-09-05 23:03:10 Re: BUG #5010: perl iconv function returns ? character