New Comment Posted to の文字化けをなおす。
- [Movable Type]
- [Perl]
[raindrop::diary] New Comment Posted toの件を、取り急ぎなおしてみた。全体をちゃんと見たわけじゃないので、適当。だけどちゃんと直った。
# MT::App::Comments # From Line 349 # <<< MODIFY # my $charset = $app->{cfg}->PublishCharset || 'iso-8859-1'; my $charset = 'iso-2022-jp'; # >>> MODIFY $head{'Content-Type'} = qq(text/plain; charset="$charset"); my $body = $app->translate( 'A new comment has been posted on your blog [_1], on entry #[_2] ([_3]).', $blog->name, $entry->id, $entry->title); require Text::Wrap; $Text::Wrap::cols = 72; $body = Text::Wrap::wrap('', '', $body) . "\n$link_url\n\n" . $app->translate('IP Address:') . ' ' . $comment->ip . "\n" . $app->translate('Name:') . ' ' . $comment->author . "\n" . $app->translate('Email Address:') . ' ' . $comment->email . "\n" . $app->translate('URL:') . ' ' . $comment->url . "\n\n" . $app->translate('Comments:') . "\n\n" . $comment->text . "\n"; # <<< ADD require Jcode; $body = new Jcode( $body )->jis(); # >>> ADD
あとは、extlibにJcodeをいれる。こんだけ。
トラックバック
- このエントリーにトラックバック:
- http://frog.raindrop.jp/cgi-bin/mt/mt-tb.cgi/140
コメント
こんなゴリゴリなおさなくても、トラックバックにあるとおり、日本語パッチで直るみたい。
試してないから知らないけど。