# charset="CP932" # encoding="CP932" # Mac NKF かなんかで MIME Decode した News Article を # Easy View で読むと Subject が途切れるのねん。 # ってゆぅか、 TidBITS 日本語版 の .etx ファイルって # 無くなったのでしょうか?? 便利だったのに。 #!/usr/bin/perl -wni~ # use diagnostics; use strict; if (/^Subject: /i) { $str = $_; next; } if (/^[ \t]/ && $str) { s/[ \t]+$//; s/^[ \t]+//; $str .= ($str !~ /[\041-\176]$/ || ! /^[\041-\176]/ ? '' : ' ') . $_; next; } if (/^[^ \t]/ && $str) { print $str; $str = ''; } print; __END__ #!/usr/bin/awk -f /^Subject: / { str = $0; next; } /^[ \t]/ && str { sub(/[ \t]+$/, ""); sub(/^[ \t]+/, ""); str = (str ((str !~ /.[\041-\176]$/ || $0 !~ /^[\041-\176]/) ? "" : " ") $0); next; } /^[^ \t]/ && str { print str; str = ""; } 1