文字列を折り返す・・・とか
- [Movable Type]
- [Perl]
「New Comment Posted to の文字化けをなおす。」でみた、Movable Typeのメールの本文作成するとこ
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";
は
$body = jcode( $body )->jfold(( 72, "\n" )); $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";
のがよさげか?
トラックバック
- このエントリーにトラックバック:
- http://frog.raindrop.jp/cgi-bin/mt/mt-tb.cgi/143
コメント