[Catalyst] Catalyst-plugin-prototype supports UTF8?
    Nathan Gray 
    kolibrie at graystudios.org
       
    Wed Nov  1 20:22:01 GMT 2006
    
    
  
On Wed, Nov 01, 2006 at 01:31:19PM -0600, Jonathan Rockway wrote:
> Don't touch the UTF8 flag.  Do this:
> 
> $data = source_of_utf8_octets();
> utf8::decode($data);
> 
> You can also get utf8 data like:
> 
> package foo;
> use utf8;
> my $data = "任天堂"; # 3 characters, no octets; don't call decode()
> 
> or
> 
> open(my $fh, '<:utf8', $filename)
> my $data = do { local $/; <$fh> };
And there is a nice tutorial at:
  http://search.cpan.org/~rgarcia/perl-5.9.4/pod/perlunitut.pod
-kolibrie
    
    
More information about the Catalyst
mailing list