Changeset 22895

Show
Ignore:
Timestamp:
11/07/08 10:04:47 (2 months ago)
Author:
tokuhirom
Message:

use flagged utf8 internaly

Location:
lang/perl/Moxy/trunk/lib/Moxy
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Moxy/trunk/lib/Moxy/Plugin.pm

    r9968 r22895  
    2222    my ($self, $context, $fname, $args) = @_; 
    2323 
    24     my $tt = Template->new(ABSOLUTE => 1); 
     24    my $tt = Template->new( 
     25        ABSOLUTE => 1, 
     26        ENCODING => 'utf8', 
     27    ); 
    2528    $tt->process( 
    2629        $self->assets_path($context)->file($fname)->stringify, 
  • lang/perl/Moxy/trunk/lib/Moxy/Plugin/ControlPanel.pm

    r22891 r22895  
    3131    my $charset = $args->{response}->charset; 
    3232    my $enc = Encode::find_encoding($charset); 
    33     Encode::from_to($output, 'utf-8', $enc ? $enc->name : 'utf-8'); 
     33    $output = Encode::encode(($enc ? $enc->name : 'utf-8'), $output); 
    3434 
    3535    # insert control panel to html response. 
  • lang/perl/Moxy/trunk/lib/Moxy/Plugin/ShowHTMLSource.pm

    r22805 r22895  
    1212    $context->log(debug => 'dump html source'); 
    1313 
     14    my $charset = $args->{response}->charset; 
     15    my $enc = Encode::find_encoding($charset); 
    1416    return $self->render_template( 
    1517        $context, 
    1618        'panel.tt' => { 
    17             html => $args->{response}->content(), 
     19            html => decode($enc, $args->{response}->content()), 
    1820        } 
    1921    );