[Catalyst] View::TT FILTERS and utf-8

A. Pagaltzis pagaltzis at gmx.de
Sat Dec 24 00:16:25 CET 2005


* apv <apv at sedition.com> [2005-12-23 22:55]:
> Yes! Nice going. It does fix them... But surely there is a way
> to do this per variable without EVAL_PERL on.

Well, it’s only a workaround to see where the bug is. Since the
TT filters work correctly when the flag is right, they’re not
buggy.

Where does your data come from?

If it’s from a file, and you know the file is UTF-8, then you
should `binmode $fh, ':utf8';` the file handle so perl knows it’s
reading UTF-8. If it is a database, the database and its DBD need
to support encodings and you need to make sure the data you put
in the database is in the correct encoding (the mechanisms vary
with RDBMS of course, so I can’t give you a good idea).


PS.: if you don’t know much about encodings, I suggest you read
this article to get the gist of how this all hangs together:

    The Absolute Minimum Every Software Developer Absolutely,
    Positively Must Know About Unicode and Character Sets (No
    Excuses!)
    <http://www.joelonsoftware.com/articles/Unicode.html>

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list