in reply to Re^2: UTF-8 webpage output from MySQL
in thread UTF-8 webpage output from MySQL
But the problems with the templates remain - as long as you use HTML::Template, you'll have to be very careful not to mix binary and text strings. So if you don't want to waste your sanity on charset issues, you should really switch to a template system that is aware to character encodings.
And since your templates have HTML::Template syntax I recommend one of the drop-in replacements, that is HTML::Template::Compiled or Template::Alloy.
The line decode_utf8($tmpl->output); in the OP demonstrates that you decode the template's output. So if HTML::Template provides you with binary data, and DBI returns upgraded data (aka text strings), your problem actually occured much earlier.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: UTF-8 webpage output from MySQL
by boboson (Monk) on Jan 22, 2008 at 13:44 UTC | |
by moritz (Cardinal) on Jan 22, 2008 at 14:11 UTC | |
by boboson (Monk) on Jan 22, 2008 at 16:24 UTC |