Re: plperlu problem with utf8

David Wheeler <david@kineticode.com>

From: "David E. Wheeler" <david@kineticode.com>
To: Oleg Bartunov <oleg@sai.msu.su>
Cc: Andrew Dunstan <andrew@dunslane.net>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2010-12-08T17:18:42Z
Lists: pgsql-hackers
On Dec 8, 2010, at 8:13 AM, Oleg Bartunov wrote:

> adding utf8::decode($_[0]) solves the problem:
> 
> knn=# CREATE OR REPLACE FUNCTION url_decode(Vkw varchar) RETURNS varchar  AS $$
>    use strict;
>    use URI::Escape;
>    utf8::decode($_[0]);
>    return uri_unescape($_[0]); $$ LANGUAGE plperlu;

Hrm. Ideally all strings passed to PL/Perl functions would be decoded.

Best,

David