[cgiapp] UTF-8 output
Michael Lackhoff
lackhoff at zbmed.uni-koeln.de
Wed Nov 4 05:49:58 EST 2009
On 04.11.2009 11:24 Cees Hek wrote:
> Can't you get DBI to do the decoding for you? I think it will depend
> on the DBD module you use, but it is quite easy with PostgeSQL:
I am using SQLite and it is also quite easy there but then I have -- as
you say -- _decoded_ values. This is what I want within my application
but as soon as I produce some output (let CGI::Application print the
template with embedded DB data) Perl does its evil magic and encodes
everything to latin1 -- at least this is what I get.
Do you do some magic with STDOUT or how do you get the UTF-8 to the
browser? Whatever I try, Perl always outputs latin1 from decoded strings
and the only remedy I found was to not let it output decoded strings but
encoded UTF-8 octets.
Sorry for the long thread but this is a horror I encounter over and over
again and I am hoping for a better understanding to get it right once
and for all.
-Michael
More information about the cgiapp
mailing list