The following bug has been logged on the website:
Bug reference: 13638
Logged by: Michal Leinweber
Email address: lei@aswsyst.cz
PostgreSQL version: 9.4.4
Operating system: Debian 8
Description:
I have UTF-8 database and using UTF-8 text in plpgsql and plperl functions.
Everything works ok, only exceptions from plperl functions have bad encoding
(maybe double encoded).
Compare output of these 2 functions:
create or replace function perl_test() returns text
language plperl as $$
return "Äeský text ÄÅ¡ÄÅžýáÃé";
$$;
create or replace function perl_test_err() returns text
language plperl as $$
elog(ERROR, "Äeská chyba ÄÅ¡ÄÅžýáÃé");
$$;