[Catalyst] Catalyst and UTF-8

Bill Moseley moseley at hank.org
Wed Nov 29 03:09:00 GMT 2006


On Wed, Nov 29, 2006 at 11:33:46AM +1030, Jon wrote:
> In my experience, you're best off treating all of your data internally
> as UTF-8, by placing
> 
> use encoding 'utf8'

Doesn't that just say your source code is encoded in utf8?  And also that
STDIN and STDOUT use that layer?

Also, the CAVEATS suggest it's not wise to use in modules due to
that lack of scoping.

> To get utf8 data out of mysql, use
> 
>     $dbh->do("SET NAMES 'utf8'");
>     $dbh->do("SET CHARACTER SET 'utf8'");

Doesn't there still need to be a decode() or layer set some place when moving the
utf8 data into perl?


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list