{"id":5788,"date":"2016-04-23T11:30:34","date_gmt":"2016-04-23T02:30:34","guid":{"rendered":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/?p=5788"},"modified":"2016-04-23T11:30:34","modified_gmt":"2016-04-23T02:30:34","slug":"imap%e3%83%a1%e3%83%bc%e3%83%ab%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e3%81%ae%e5%8d%b1%e6%a9%9f-2","status":"publish","type":"post","link":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/?p=5788","title":{"rendered":"IMAP\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306e\u5371\u6a5f (2)"},"content":{"rendered":"<p>Imap&#12398;&#12469;&#12540;&#12496;&#12540;&#12398;&#12518;&#12540;&#12470;&#12540;&#12487;&#12451;&#12524;&#12463;&#12488;&#12522;&#12540;&#12395;&#20445;&#23384;&#12373;&#12428;&#12390;&#12356;&#12427;&#12501;&#12449;&#12452;&#12523;&#12398;&#21517;&#21069;&#12399;MIME&#12391;&#12399;&#12394;&#12367;&#12289;UTF-7&#12384;&#12381;&#12358;&#12391;&#12377;&#12290;<\/p>\n<p>&#12391;&#12289;&#12381;&#12428;&#12434;&#22793;&#25563;&#12377;&#12427;perl&#12473;&#12463;&#12522;&#12503;&#12488;&#12434;&#20316;&#12426;&#12414;&#12375;&#12383;&#12290;&#20316;&#12387;&#12383;&#12392;&#35328;&#12387;&#12390;&#12418;&#24403;&#35442;&#12398;CPAN&#12514;&#12472;&#12517;&#12540;&#12523;&#12434;&#21628;&#12403;&#20986;&#12377;&#12384;&#12369;&#12391;&#12377;&#12364;&#12290;<\/p>\n<p>&#12383;&#12384;&#12375;&#12289;&#12371;&#12428;&#12395;&#12399;&#32608;&#12364;&#12354;&#12387;&#12390;&#12289;<a href=\"http:\/\/search.cpan.org\/~pmakholm\/Encode-IMAPUTF7-1.05\/lib\/Encode\/IMAPUTF7.pm\">CPAN&#12514;&#12472;&#12517;&#12540;&#12523;&#12398;IMAP-UTF-7&#12398;&#35500;&#26126;<\/a>&#12395;&#12399;&#38291;&#36949;&#12356;&#12364;&#12354;&#12426;&#12414;&#12377;&#12290;<\/p>\n<pre class=\"message\">use Encode qw\/encode decode\/;<\/pre>\n<p>&#12391;&#12399;&#12394;&#12367;&#12390;&#12289;<\/p>\n<pre class=\"message\">use Encode::IMAPUTF7;<\/pre>\n<p>&#12392;&#12375;&#12394;&#12356;&#12392;&#12356;&#12369;&#12414;&#12379;&#12435;<sup class=\"modern-footnotes-footnote \" data-mfn=\"1\" data-mfn-post-scope=\"000000000000032b0000000000000000_5788\"><a href=\"javascript:void(0)\" role=\"button\" aria-pressed=\"false\" aria-describedby=\"mfn-content-000000000000032b0000000000000000_5788-1\">1<\/a><\/sup><span id=\"mfn-content-000000000000032b0000000000000000_5788-1\" role=\"tooltip\" class=\"modern-footnotes-footnote__note\" tabindex=\"0\" data-mfn=\"1\">&#20363;&#12360;&#12400;&#12289;<a href=\"https:\/\/bugs.debian.org\/cgi-bin\/bugreport.cgi?bug=642819\">debian&#12398;&#12501;&#12457;&#12540;&#12521;&#12512;&#21442;&#29031;<\/a>&#12290;<\/span>&#12290;&#12378;&#12356;&#12406;&#12435;&#26132;&#12363;&#12425;&#25351;&#25688;&#12373;&#12428;&#12390;&#12356;&#12427;&#12398;&#12395;&#12289;&#30452;&#12387;&#12390;&#12356;&#12414;&#12379;&#12435;^^;<\/p>\n<p>&#12473;&#12463;&#12522;&#12503;&#12488;&#20184;&#12369;&#12392;&#12365;&#12414;&#12377;&#12290;GNU GPL 3.0 or later&#12387;&#12385;&#12421;&#12358;&#12371;&#12392;&#12391;&#12290;<\/p>\n<pre>#!\/usr\/bin\/perl\n# imapdecode.pl\n# by I Hieda (JE1SGH), 22 Apr 2016\n# GNU GPL 3.0 or later\n\nuse Encode::IMAPUTF7;\n\n$filename = @ARGV[0];\n\n$outname=Encode::decode('IMAP-UTF-7',$filename);\nbinmode(STDOUT,\":utf8\");\n\nprint $filename,\" : \";\nprint $outname,\"\\n\";\n\n<\/pre>\n<p>&#20351;&#12356;&#26041;&#12392;&#12375;&#12390;&#12399;&#12289;<\/p>\n<pre>\u00a0for i in `ls`; do imapdecode.pl $i; done<\/pre>\n<p>&#12394;&#12393;&#12392;&#12375;&#12414;&#12377;&#12290;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imap\u306e\u30b5\u30fc\u30d0\u30fc\u306e\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u306fMIME\u3067\u306f\u306a\u304f\u3001UTF-7\u3060\u305d\u3046\u3067\u3059\u3002 \u3067\u3001\u305d\u308c\u3092\u5909\u63db\u3059\u308bperl\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\u4f5c\u3063\u305f\u3068\u8a00\u3063\u3066\u3082\u5f53\u8a72\u306eCPAN\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u547c\u3073\u51fa\u3059\u3060\u3051\u3067\u3059\u304c\u3002 \u305f\u3060\u3057\u3001\u3053\u308c\u306b\u306f\u7f60\u304c\u3042\u3063\u3066\u3001CPAN\u30e2\u30b8\u30e5\u30fc\u30eb\u306eIMAP-UTF-7\u306e\u8aac\u660e\u306b\u306f\u9593\u9055\u3044\u304c\u3042\u308a\u307e\u3059\u3002 use Encode qw\/encode decode\/; \u3067\u306f\u306a\u304f\u3066\u3001 use Encode::IMAPUTF7; \u3068\u3057\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\u305a\u3044\u3076\u3093\u6614\u304b\u3089\u6307\u6458\u3055\u308c\u3066\u3044\u308b\u306e\u306b\u3001\u76f4\u3063\u3066\u3044\u307e\u305b\u3093^^; \u30b9\u30af\u30ea\u30d7\u30c8\u4ed8\u3051\u3068\u304d\u307e\u3059\u3002GNU GPL 3.0 or later\u3063\u3061\u3085\u3046\u3053\u3068\u3067\u3002 #!\/usr\/bin\/perl # imapdecode.pl # by I Hieda (JE1SGH), 22 Apr 2016 # GNU GPL 3.0 or later use Encode::IMAPUTF7; $filename = @ARGV[0]; $outname=Encode::decode(&#8216;IMAP-UTF-7&#8217;,$filename); binmode(STDOUT,&#8221;:utf8&#8243;); print $filename,&#8221; : &#8220;; print $outname,&#8221;\\n&#8221;; \u4f7f\u3044\u65b9\u3068\u3057\u3066\u306f\u3001 \u00a0for i in `ls`; do imapdecode.pl $i; done &hellip; <a href=\"https:\/\/je1sgh.mydns.jp\/je1sghblog\/?p=5788\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;IMAP\u30e1\u30fc\u30eb\u30dc\u30c3\u30af\u30b9\u306e\u5371\u6a5f (2)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"","footnotes":""},"categories":[10],"tags":[100,227,229,231,302,377,429,432],"class_list":["post-5788","post","type-post","status-publish","format-standard","hentry","category-network","tag-apple-mail","tag-imap","tag-imaps","tag-ios","tag-mime","tag-retrospect","tag-thunderbird","tag-time-machine"],"publishpress_future_action":{"enabled":false,"date":"2026-06-02 08:20:48","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts\/5788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5788"}],"version-history":[{"count":0,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=\/wp\/v2\/posts\/5788\/revisions"}],"wp:attachment":[{"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/je1sgh.mydns.jp\/je1sghblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}