Catalyst + TT + Unicode in template + Unicode in YAML config + POST = double encoding

Thursday, 9 August 2007

Nerd warning

This very nice module, Catalyst::View::TT::ForceUTF8, is an add and forget for handling utf8 problems with Catalyst and Perl. But even with it as the base for your TT2 view, you will get double encoded utf8 in your web pages on POST if you have utf8 coming into your template from a YAML config file. To fix this simply “use” YAML::Syck in It understands how to properly bring in utf8 and the double encoding should disappear.

digg stumbleupon reddit Fark Technorati Faves