[Catalyst] Catalyst and UTF-8

Mao DengFeng-e13751 e13751 at motorola.com
Wed Nov 29 03:20:26 GMT 2006


As I know, perl handle string with unicode. So you needn't decode( )
when you retrieve data from database with UTF

Thanks
Mao Deng feng 



-----Original Message-----
From: Bill Moseley [mailto:moseley at hank.org] 
Sent: Wednesday, November 29, 2006 11:09 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Catalyst and UTF-8

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


_______________________________________________
List: Catalyst at lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list