{"id":238,"date":"2009-05-21T15:24:07","date_gmt":"2009-05-20T23:24:07","guid":{"rendered":"http:\/\/blog.longwin.com.tw\/?p=238"},"modified":"2009-05-21T15:24:07","modified_gmt":"2009-05-20T23:24:07","slug":"php-unicode","status":"publish","type":"post","link":"https:\/\/blog.fhl.net\/?p=238","title":{"rendered":"PHP\u7528\u7684unicode\u4e2d\u6587\u7e41\u7c21\u9ad4\u5c0d\u7167\u8868"},"content":{"rendered":"<p>\n\u6211\u5011\u7684\u7db2\u7ad9\u652f\u63f4\u7e41\u7c21\u9ad4\u4e2d\u6587\uff0c\u4ee5\u524d\u6211\u5011\u90fd\u662f\u7528 autoconvert\u9019\u500b\u8edf\u9ad4\u4f86\u8655\u7406\u7e41\u7c21\u9ad4\u8f49\u63db\uff0c\u9084\u7b97\u597d\u7528\uff0c\u4e0d\u904e\u5f8c\u4f86\u9019\u500b\u7a0b\u5f0f\u505c\u6b62\u7dad\u8b77\uff0c\u6211\u5011\u90fd\u8981\u53e6\u5916\u5b89\u88dd\u624d\u80fd\u641e\u5b9a\uff0c\u6240\u4ee5\u5f8c\u4f86\u6539\u7528iconv \u4f86\u8f49\u63db\u3002\n<\/p>\n<p>\niconv\u6709\u500b\u7f3a\u9ede\uff0c\u5c31\u662f\u7e41\u9ad4\u4e2d\u6587\u6709\u6642\u5019\u6709\u4e9b\u5b57\u4e26\u6c92\u6709\u7c21\u9ad4\u5b57\u7684\u5c0d\u61c9\uff0c\u9019\u6642\u5019autoconvert\u6703\u7528\u7a7a\u767d\u4f86\u53d6\u4ee3\uff0c\u4f46\u662ficonv\u5c31\u76f4\u63a5\u5207\u65b7\u6574\u500b\u6587\u5b57\u5b57\u4e32\uff0c\u76f4\u63a5\u4e0d\u8655\u7406\u9019\u500b\u8f49\u4e0d\u51fa\u4f86\u7684\u5b57\u5f8c\u9762\u7684\u6587\u5b57\uff0c\u5c0e\u81f4\u8f49\u63db\u5e38\u5e38\u51fa\u73fe\u554f\u984c\u3002\n<\/p>\n<p>\n\u6211\u5011\u5728\u7db2\u8def\u4e0a\u4e5f\u627e\u4e0d\u5230uincode\u7684\u7e41\u7c21\u9ad4\u5c0d\u7167\u8868\uff0c\u6240\u4ee5\u4e00\u76f4\u6c92\u6709\u89e3\u6c7a\u554f\u984c\u3002\u5f8c\u4f86\u6211\u5011\u6c7a\u5b9a\u81ea\u5df1\u505a\u4e00\u5957\uff0c\u9664\u4e86\u89e3\u6c7a\u81ea\u5df1\u7684\u554f\u984c\uff0c\u4e5f\u53ef\u4ee5\u5206\u4eab\u7d66\u5927\u5bb6\uff1a\n<\/p>\n<p>\n<a id=\"res_35\" href=\"http:\/\/blog.fhl.net\/gallery\/7\/bg2gb.zip\">bg2gb.zip<\/a>\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n\u5927\u5bb6 require(&#8216;bg2gb.php&#8217;); \u4e4b\u5f8c\uff0c\u53ea\u8981&nbsp; $str=str_replace($BIG5C,$GB2312C,$str); \u5c31\u53ef\u4ee5\u7e41\u9ad4\u8f49\u7c21\u9ad4\uff0c\n<\/p>\n<p>\n&nbsp;$str=tr_replace($GB2312C,$BIG5C,$str);\u5373\u53ef\u7c21\u9ad4\u8f49\u7e41\u9ad4<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5011\u7684\u7db2\u7ad9\u652f\u63f4\u7e41\u7c21\u9ad4\u4e2d\u6587\uff0c\u4ee5\u524d\u6211\u5011\u90fd\u662f\u7528 autoconvert\u9019\u500b\u8edf\u9ad4\u4f86\u8655\u7406\u7e41\u7c21\u9ad4\u8f49\u63db\uff0c\u9084\u7b97\u597d\u7528\uff0c\u4e0d\u904e\u5f8c\u4f86\u9019 &hellip; <a href=\"https:\/\/blog.fhl.net\/?p=238\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">PHP\u7528\u7684unicode\u4e2d\u6587\u7e41\u7c21\u9ad4\u5c0d\u7167\u8868<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-238","post","type-post","status-publish","format-standard","hentry","category-e"],"_links":{"self":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=238"}],"version-history":[{"count":0,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fhl.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}