{"id":3247,"date":"2010-09-01T22:29:54","date_gmt":"2010-09-01T13:29:54","guid":{"rendered":"http:\/\/mayragna.net\/weblog\/myway\/2010\/09\/01\/post_637\/"},"modified":"2010-09-01T22:29:54","modified_gmt":"2010-09-01T13:29:54","slug":"post_637","status":"publish","type":"post","link":"https:\/\/mayragna.net\/weblog\/pc_hard\/3247\/","title":{"rendered":"\u306f\u304f\u3057\u3085"},"content":{"rendered":"<p>\u4eca\u56de\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u554f\u984c\u3067\u307e\u305f\u5c11\u3057\u77e5\u8b58\u304c\u5897\u3048\u305f\u306e\u3067<br \/>\n\u5b9f\u5bb3\u306f\u307b\u3068\u3093\u3069\u7121\u3044\u3051\u3069\u4ee5\u524d\u304b\u3089\u5ea6\u3005\u6587\u5b57\u5316\u3051\u3057\u307e\u304f\u3063\u3066\u3044\u305f<br \/>\n\u62cd\u624b\u306e\u30ed\u30b0\u753b\u9762\u3092\u3069\u3046\u306b\u304b\u3059\u308b\u4e8b\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u62cd\u624b\u81ea\u4f53\u306f\u307e\u3063\u305f\u304f\u554f\u984c\u306a\u304f\u4f7f\u3048\u308b\u306e\u3067<br \/>\n\u5229\u7528\u8005\u306b\u306f\u5168\u7136\u5b9f\u5bb3\u7121\u3044\u306e\u3067\u3059\u304c<br \/>\n\u7ba1\u7406\u5074\u3068\u3057\u3066\u306f\u62cd\u624b\u3092\u8cb0\u3063\u305f\u8a72\u5f53\u306e\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u306f\u6587\u5b57\u5316\u3051\u3059\u308b\u3057<br \/>\n\u30b3\u30e1\u30f3\u30c8\u3082\u4e00\u90e8\u6587\u5b57\u5316\u3051\u3059\u308b\u306e\u3067\u61b6\u6e2c\u3067\u53c2\u7167\u3057\u305f\u308a\u3057\u3066\u305f\u306e\u3067<br \/>\n\u3042\u3093\u307e\u308a\u56f0\u308b\u3082\u306e\u3067\u3082\u306a\u3044\u3051\u308c\u3069\u3001\u6298\u89d2\u6587\u5b57\u30b3\u30fc\u30c9\u554f\u984c\u3084\u3089\u306e\u89e3\u6c7a\u65b9\u6cd5\u304c\u5224\u3063\u305f\u306e\u3067<br \/>\n\u4fee\u6b63\u3057\u3066\u898b\u305f\u6b21\u7b2c\u3002<br \/>\n\u30a6\u30c1\u3067\u4f7f\u3063\u3066\u3044\u308b\u62cd\u624b\u306f\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d3\u30b9\u3067\u306f\u306a\u304f<br \/>\nphp\u3067\u4f5c\u3089\u308c\u305fgj\uff08\u30b0\u30c3\u30b8\u30e7\u30d6\uff09\u3068\u3044\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3067<br \/>\n\u8a2d\u7f6e\u3068\u8a2d\u5b9a\u3060\u3051\u3059\u308c\u3070\u3042\u3068\u306f\u52dd\u624b\u306b\u5404\u8a18\u4e8b\u3054\u3068\u306b\u62cd\u624b\u30dc\u30bf\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u3066<br \/>\n\u62cd\u624b\u30dc\u30bf\u30f3\u3092\u62bc\u305b\u3070\u8a18\u4e8b\u3054\u3068\u306b\u30ed\u30b0\u3092\u4f5c\u6210\u3057<br \/>\n\u3069\u306e\u8a18\u4e8b\u306b\u5bfe\u3057\u3066\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u304b\u3001\u30b3\u30e1\u30f3\u30c8\u304c\u5165\u3063\u305f\u304b<br \/>\n\u4f55\u56de\u62bc\u3055\u308c\u305f\u304b\u3092\u5168\u90e8\u5358\u72ec\u3067\u96c6\u8a08\u3057\u3066\u304f\u308c\u308b\u306e\u3067<br \/>\n\u9650\u308a\u306a\u304f\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d3\u30b9\u4e26\u306e\u6a5f\u80fd\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002<br \/>\n\u3067\u3059\u304c\u3001\u3053\u308c\u4f55\u6545\u304b<br \/>\n\u4f5c\u6210\u3055\u308c\u305f\u30ed\u30b0\u304c\u53d6\u5f97\u3057\u305f\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u304c\u6642\u3005\u6587\u5b57\u5316\u3051\u3057\u307e\u3059\u3002<br \/>\n\u30a6\u30c1\u306e\u74b0\u5883\u304c\u60aa\u3044\u306e\u304bgj\u306e\u554f\u984c\u306a\u306e\u304b\u5224\u308a\u304b\u306d\u3066\u307e\u3057\u305f\u304c<br \/>\n\u6587\u5b57\u5316\u3051\u3068\u8a00\u3048\u3070\u6587\u5b57\u30b3\u30fc\u30c9\u306a\u306e\u3067\u3001\u6587\u5b57\u30b3\u30fc\u30c9\u3082\u8abf\u3079\u305f\u3051\u308c\u3069<br \/>\n\u4f5c\u8005\u30da\u30fc\u30b8\u3067\u306fgj\u306fUTF-8\u3067\u4f5c\u3089\u308c\u3066\u308b\u3068\u3044\u3046\u3060\u3051\u3067\u305d\u308c\u4ee5\u5916\u306e\u60c5\u5831\u306f\u7121\u3057\u3002<br \/>\n\u3067\u3082\u30ed\u30b0\u3092\u8abf\u3079\u308b\u3068Shift_JIS\u3002\u4f55\u3067\u30ed\u30b0\u3060\u3051sjis\u306a\u306e\u304b\u3002<br \/>\n\u305f\u3060\u307e\u3041\u305d\u308c\u3067\u3082\u52d5\u3044\u3066\u3044\u305f\u306e\u3067\u554f\u984c\u306f\u7121\u3044\u306e\u3067\u3059\u304c\uff65\uff65\uff65\u3002<br \/>\n\u3067\u3001\u4eca\u56deblog\u5168\u90e8\u3092UTF-8\u306b\u3057\u305f\u306e\u3067php\u30d7\u30ed\u30b0\u30e9\u30e0\u306f<br \/>\n\u7121\u6761\u4ef6\u3067UTF-8\u3067\u30a8\u30f3\u30b3\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067<br \/>\n\u62cd\u624b\u306e\u30ed\u30b0\u3092\u898b\u308b\u30da\u30fc\u30b8\u3082\u5168\u90e8UTF-8\u306b\u306a\u3063\u3066\u3057\u307e\u3044<br \/>\n\u30ed\u30b0\u3082\u5168\u90e8\u6587\u5b57\u5316\u3051\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u4e0d\u4fbf\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306e\u30da\u30fc\u30b8\u3060\u3051\u5f93\u6765\u306eShift_JIS\u3067\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u3059\u308c\u3070\u3044\u3044\u306e\u3067\u3059\u304c<br \/>\n\u6298\u89d2\u306a\u3089\u5168\u90e8UTF-8\u306b\u306a\u308b\u3088\u3046\u306b\u6539\u9020\u3057\u3088\u3046\u304b\u3068\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u30bd\u30fc\u30b9\u304c\uff08\u6a2a\u306b\uff09\u9577\u3044\u306e\u3067\u8ffd\u8a18\u306b\u2193<\/p>\n<p><!--more--><br \/>\n\u3068\u308a\u3042\u3048\u305aphp\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8997\u3044\u3066\u307f\u308b\u4e8b\u306b\u3002<br \/>\ngj\u306e\u672c\u4f53\u81ea\u4f53\u306fUTF-8\u3067\u4fdd\u5b58\u3057\u3066\u3042\u308b\u306e\u3067\u672c\u4f53\u306f\u554f\u984c\u306a\u3044\u3067\u3059\u304c<br \/>\n\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u304c\u30b7\u30d5\u30c8JIS\u306b\u306a\u3063\u3066\u308b\u306e\u3067<br \/>\n\u66f8\u304d\u8fbc\u307f\u6642\u306b\u30b7\u30d5\u30c8JIS\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u308b\u30ef\u30b1\u3002<br \/>\n\u308f\u305f\u3057\u3083\u77e5\u8b58\u304c\u504f\u3063\u3066\u308b\u306e\u3067\u66f8\u304d\u8fbc\u307f\u6642\u306b\u4f55\u3067\u30b7\u30d5\u30c8JIS\u306b\u306a\u3063\u3066\u308b\u306e\u304b\u77e5\u308a\u307e\u305b\u3093\u3002<br \/>\n\u305d\u3082\u305d\u3082\u66f8\u304d\u8fbc\u307f\u6642\u306b\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3067\u304d\u308b\u306e\u304b\u3082\u5206\u304b\u308a\u307e\u305b\u3093\u3002<br \/>\n\u3069\u3063\u304b\u3067\u30b7\u30d5\u30c8JIS\u3068\u3057\u3066\u6587\u5b57\u5217\u3092\u6271\u3063\u3066\u308b\u306e\u304b\u5206\u304b\u308a\u307e\u305b\u3093\u304c<br \/>\nShift_JIS\u3068\u66f8\u3044\u3066\u3042\u308b\u90e8\u5206\u306f\u5168\u90e8UTF-8\u306b\u3057\u305f\u3051\u3069\u5909\u308f\u3089\u305a\u3002<br \/>\n\u3067\u3082\u66f8\u304d\u8fbc\u3093\u3060\u30d5\u30a1\u30a4\u30eb\u304c\u30b7\u30d5\u30c8JIS\u306a\u306e\u306f\u9593\u9055\u3044\u306a\u3044\u306e\u3067<br \/>\n\u66f8\u304d\u8fbc\u3080\u524d\u306bUTF-8\u306b\u5909\u63db\u3059\u308c\u3070\u3044\u3044\u3068\u601d\u3063\u3066<br \/>\n\u66f8\u304d\u8fbc\u307f\u624b\u524d\u306b\u6587\u5b57\u30b3\u30fc\u30c9\u5909\u63db\u3092\u8ffd\u52a0\u3057\u3066\u307f\u305f\u3002<br \/>\n\u5177\u4f53\u7684\u306b\u306f\u3053\u3093\u306a\u611f\u3058\u3002<br \/>\n<strong>\u6539\u9020\u524d\uff1a<\/strong><\/p>\n<blockquote><p>fwrite($file2, $date . &#8220;,&#8221; . $pagename . &#8220;,&#8221; . htmlspecialchars($pageurl) . &#8220;,&#8221; . htmlspecialchars(urldecode(substr($_GET[&#8216;gj_message&#8217;],0,$STRLEN))) . &#8220;,&#8221; . $ip . &#8220;,&#8221; . $host . &#8220;,&#8221; . $ref . &#8220;\\r\\n&#8221;);<br \/>\nfclose($file2);<\/p><\/blockquote>\n<p><em>\u6539\u9020\u5f8c\uff1a<\/em><\/p>\n<blockquote><p>$str = $date . &#8220;,&#8221; . $pagename . &#8220;,&#8221; . htmlspecialchars($pageurl) . &#8220;,&#8221; . htmlspecialchars(urldecode(substr($_GET[&#8216;gj_message&#8217;],0,$STRLEN))) . &#8220;,&#8221; . $ip . &#8220;,&#8221; . $host . &#8220;,&#8221; . $ref . &#8220;\\r\\n&#8221;;<br \/>\n$str = mb_convert_encoding($str,&#8221;UTF-8&#8243; , &#8220;Shift_JIS&#8221;);<br \/>\nfwrite($file2, $str);<br \/>\nfclose($file2);<\/p><\/blockquote>\n<p>fwrite\u306e\u624b\u524d\u306b\u3001\u3068\u308a\u3042\u3048\u305a\u5909\u6570$str\u306b\u66f8\u304d\u8fbc\u3080\u5185\u5bb9\u3092\u5165\u308c\u3066<br \/>\n\u305d\u306e\u5f8c\u3067$str\u306e\u4e2d\u8eab\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092mb_convert_encoding\u3067\u30b7\u30d5\u30c8JIS\u304b\u3089UTF-8\u306b\u5909\u63db\u3002<br \/>\n\u305d\u3057\u3066\u5909\u63db\u3057\u3066\u304b\u3089fwrite\u3067\u5185\u5bb9\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u3088\u3046\u306b\u3002<br \/>\n\u3053\u3046\u3059\u308b\u3060\u3051\u3067\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306f\u6587\u5b57\u30b3\u30fc\u30c9UTF-8\u3067\u4f5c\u6210\u3055\u308c\u308b\u306e\u3067<br \/>\nphp\u304c\u5f37\u5236\u7684\u306bUTF-8\u3067\u8868\u793a\u3057\u3066\u3082\u554f\u984c\u306a\u3057\u306b\u3002<br \/>\n\u540c\u3058\u3088\u3046\u306b\u65b0\u7740\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308bnew.dat\u306e\u66f8\u304d\u8fbc\u307f\u90e8\u5206\u3082<br \/>\n<strong>\u6539\u9020\u524d\uff1a<\/strong><\/p>\n<blockquote><p>fwrite($fnew, $date . &#8220;,&#8221; . $pagename . &#8220;,&#8221; . htmlspecialchars($pageurl) . &#8220;,&#8221; . htmlspecialchars(urldecode(substr($_GET[&#8216;gj_message&#8217;],0,$STRLEN))) . &#8220;,&#8221; . $ip . &#8220;,&#8221; . $host . &#8220;,&#8221; . $ref . &#8220;\\n&#8221;);<\/p><\/blockquote>\n<p><em>\u6539\u9020\u5f8c\uff1a<\/em><\/p>\n<blockquote><p>$str = $date . &#8220;,&#8221; . $pagename . &#8220;,&#8221; . htmlspecialchars($pageurl) . &#8220;,&#8221; . htmlspecialchars(urldecode(substr($_GET[&#8216;gj_message&#8217;],0,$STRLEN))) . &#8220;,&#8221; . $ip . &#8220;,&#8221; . $host . &#8220;,&#8221; . $ref . &#8220;\\n&#8221;;<br \/>\n$str = mb_convert_encoding($str,&#8221;UTF-8&#8243; , &#8220;Shift_JIS&#8221;);<br \/>\nfwrite($fnew, $str);<\/p><\/blockquote>\n<p>\u3084\u3063\u3066\u308b\u4e8b\u306f\u540c\u3058\u3002<br \/>\nnew.dat\u306e\u65b9\u306f\u3053\u306e\u5f8c\u306b\u3082fwrite\u3067\u62cd\u624b\u56de\u6570\u3092\u66f8\u304d\u8fbc\u3093\u3067\u308b\u3051\u3069<br \/>\n\u534a\u89d2\u6570\u5b57\u306e\u30c7\u30fc\u30bf\u306a\u306e\u3067\u95a2\u4fc2\u306a\u3044\u3067\u3059\u3001\u591a\u5206\u3002<br \/>\n\u4eca\u56de\u306fUTF-8\u3067\u66f8\u304d\u8fbc\u3080\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u304c<br \/>\n\u3053\u308c\u304c\u3082\u3057EUC-JP\u3067\u66f8\u304d\u8fbc\u307f\u305f\u3044\u5834\u5408\u306f\u3001UTF-8\u3092EUC-JP\u306b\u3059\u308b\u3060\u3051\u3067\u3044\u3044\u3068\u601d\u3046\u3002<br \/>\n\u4f55\u306a\u3089\u521d\u671f\u8a2d\u5b9a\u306e\u6240\u306b$tcode\u3068\u304b\u5909\u6570\u8ffd\u52a0\u3057\u3066<\/p>\n<blockquote><p>\/\/\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u6307\u5b9a\u3001\u7a7a\u767d\u306a\u3089\u30b7\u30d5\u30c8JIS\u3067\u66f8\u304d\u8fbc\u307f<br \/>\n\/\/&#8221;EUC-JP&#8221;\u304b&#8221;UTF-8&#8243;\u3092\u6307\u5b9a\u3002\u305d\u308c\u4ee5\u5916\u306f\u7121\u8996\u3055\u308c\u307e\u3059<br \/>\n$tcode = &#8220;UTF-8&#8221;;<\/p><\/blockquote>\n<p>\u3068\u304b\u306b\u3057\u3066\u3001\u3055\u3063\u304d\u306e<\/p>\n<blockquote><p>$str = mb_convert_encoding($str,&#8221;UTF-8&#8243; , &#8220;Shift_JIS&#8221;);<\/p><\/blockquote>\n<p>\u3092<\/p>\n<blockquote><p>if ($tcode === &#8220;UTF-8&#8221; || $tcode === &#8220;EUC-JP&#8221;) {<br \/>\n$str = mb_convert_encoding($str,$tcode , &#8220;Shift_JIS&#8221;);<br \/>\n}<\/p><\/blockquote>\n<p>\u306b\u3059\u308c\u3070\u3001$tcode\u306bUTF-8\u7b49\u306e\u5024\u304c\u3042\u3063\u305f\u3089\u305d\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3067\u5909\u63db<br \/>\n\u5024\u304c\u7121\u3044\u5834\u5408\u3084\u3001UTF-8\u3068EUC-JP\u4ee5\u5916\u306e\u6587\u5b57\u304c\u5165\u3063\u3066\u3044\u305f\u5834\u5408\u306f<br \/>\n\u3053\u306e\u6761\u4ef6\u5f0f\u3092\u901a\u3089\u306a\u3044\u306e\u3067\u666e\u901a\u306b\u30b7\u30d5\u30c8JIS\u306e\u307e\u307e\u66f8\u304d\u8fbc\u307f\u3092\u3059\u308b<br \/>\n\u3068\u3044\u3063\u305f\u611f\u3058\u306b\u306a\u308b\u306f\u305a\u3002<br \/>\n\u9069\u5f53\u306b\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3051\u3069\u3001\u30a6\u30c1\u3067\u306f\u554f\u984c\u306a\u304f\u52d5\u3044\u3066\u308b\u306e\u3067\u3053\u308c\u3067\u3044\u3044\u3084\u3002<br \/>\nxml\u3082\u4f5c\u6210\u3057\u3066\u308b\u3063\u307d\u3044\u306e\u3067\u3001\u4e0a\u8a18\u306e$tcode\u3092\u53c2\u7167\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u5834\u5408\u306f<\/p>\n<blockquote><p>if(!fwrite($XML, $xmldata-&gt;dump_mem(true, &#8220;UTF-8&#8221; )))<\/p><\/blockquote>\n<p>\u306e&#8221;UTF-8&#8243;\u3092$tcode\u306b\u66f8\u304d\u63db\u3048\u305f\u308a\u3001<\/p>\n<blockquote><p>&lt;?xml version=&#8217;1.0&#8242; encoding=&#8221;UTF-8&#8243; ?&gt;<\/p><\/blockquote>\n<p>\u3082$tcode\u306b\u3059\u308b\u5fc5\u8981\u3042\u308b\u304b\u3082\u3002\u3084\u3063\u3066\u306a\u3044\u304b\u3089\u308f\u304b\u3089\u3093\u3002<br \/>\n\uff65\uff65\uff65\u4eee\u306b\u3082\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5c11\u3057\u9f67\u3063\u3066\u305f\u306e\u306b\u306a\u3093\u3066\u9069\u5f53\u306a\u3093\u3060\uff65\uff65\uff65\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u306e\u554f\u984c\u3067\u307e\u305f\u5c11\u3057\u77e5\u8b58\u304c\u5897\u3048\u305f\u306e\u3067 \u5b9f\u5bb3\u306f\u307b\u3068\u3093\u3069\u7121\u3044\u3051\u3069\u4ee5\u524d\u304b\u3089\u5ea6\u3005\u6587\u5b57\u5316\u3051\u3057\u307e\u304f\u3063\u3066\u3044\u305f \u62cd\u624b\u306e\u30ed\u30b0\u753b\u9762\u3092\u3069\u3046\u306b\u304b\u3059\u308b\u4e8b\u306b\u3057\u307e\u3057\u305f\u3002 \u62cd\u624b\u81ea\u4f53\u306f\u307e\u3063\u305f\u304f\u554f\u984c\u306a\u304f\u4f7f\u3048\u308b\u306e\u3067 \u5229\u7528\u8005\u306b\u306f\u5168\u7136\u5b9f\u5bb3\u7121\u3044\u306e\u3067\u3059\u304c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-3247","post","type-post","status-publish","format-standard","hentry","category-pc_hard"],"_links":{"self":[{"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/posts\/3247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/comments?post=3247"}],"version-history":[{"count":0,"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/posts\/3247\/revisions"}],"wp:attachment":[{"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/media?parent=3247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/categories?post=3247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mayragna.net\/weblog\/wp-json\/wp\/v2\/tags?post=3247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}