BUG #5010: perl iconv function returns ? character - Mailing list pgsql-bugs

From Lampa
Subject BUG #5010: perl iconv function returns ? character
Date
Msg-id 200908251215.n7PCFwbq019940@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5010: perl iconv function returns ? character
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5010
Logged by:          Lampa
Email address:      lampacz@gmail.com
PostgreSQL version: 8.4.0
Operating system:   Debian testing/unstable
Description:        perl iconv function returns ? character
Details:

See the difference (example is the best explanation):

psql -U postgres -p 5433
psql (8.4.0, server 8.3.7)
WARNING: psql version 8.4, server version 8.3.
         Some psql features might not work.
Type "help" for help.

postgres=# select my_ascii2('Bockaničová');
  my_ascii2
-------------
 Bockanicova
(1 row)

psql -U postgres -p 5432
psql (8.4.0)
Type "help" for help.

postgres=# select my_ascii2('Bockaničová');
  my_ascii2
-------------
 Bockani?ov?
(1 row)


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

in more complicated queries (joins, conditions) after my_ascii2 function
query are returned incorect count of rows

pgsql-bugs by date:

Previous
From: "Fernando Velloso Tanure"
Date:
Subject: BUG #5009: Loss of information
Next
From: Craig Ringer
Date:
Subject: Re: BUG #5009: Loss of information