Show
Ignore:
Timestamp:
06/18/08 18:52:33 (5 months ago)
Author:
tokuhirom
Message:

utf8 safe.

Location:
lang/perl/App-Nakanobu/trunk/lib/App
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/App-Nakanobu/trunk/lib/App/Nakanobu.pm

    r14214 r14219  
    2626    default => sub { 
    2727        my $self = shift; 
    28         YAML::LoadFile( $self->conffile ) 
     28        my $fh =  $self->conffile->open('<:utf8') or die $!; 
     29        my $dat = YAML::Load( do { local $/; <$fh> } ); 
     30        $fh->close; 
     31        $dat; 
    2932    }, 
    3033); 
  • lang/perl/App-Nakanobu/trunk/lib/App/Nakanobu/Plugin/Component/IRCClient.pm

    r14216 r14219  
    134134    $heap->{irc}->yield( charset => $heap->{plugin}->charset ); 
    135135 
    136     foreach ( @{ $heap->{plugin}->channels } ) { 
    137         msg "joining channel $_"; 
    138         $heap->{irc}->yield( 'join' => $_ ); 
     136    for my $channel ( @{ $heap->{plugin}->channels } ) { 
     137        msg "joining channel $channel"; 
     138        $heap->{irc}->yield( 'join' => encode( $heap->{plugin}->charset, $channel ) ); 
    139139    } 
    140140}