Changeset 942

Show
Ignore:
Timestamp:
06/09/06 17:04:38
Author:
miyagawa
Message:

Publish::CHTML: Don't die if body contains non-sjis mappable characters

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/CHTML.pm

    r104 r942  
    2020    my ($self, $context) = @_; 
    2121    $self->{context} = $context; 
    22     $self->conf->{encoding} ||= 'shiftjis'; 
     22    $self->conf->{encoding} ||= 'shift_jis'; 
    2323    $self->{id} = time; 
    2424    @{$self->{feeds}} = (); 
     
    123123    my ($self, $file, $chtml, $symlink) = @_; 
    124124    open my $out, ">:encoding($self->{conf}->{encoding})", $file or $self->context->error("$file: $!"); 
     125    local $PerlIO::encoding::fallback = Encode::FB_HTMLCREF; 
    125126    print $out $chtml; 
    126127    close $out;