{"id":212,"date":"2009-04-10T15:07:20","date_gmt":"2009-04-10T07:07:20","guid":{"rendered":"\/wp\/post\/212.html"},"modified":"2010-04-23T13:27:44","modified_gmt":"2010-04-23T05:27:44","slug":"%e8%bd%ac%e8%b4%b4%ef%bc%9a%e5%ad%97%e7%ac%a6%e7%bc%96%e7%a0%81%e7%ac%94%e8%ae%b0%ef%bc%9aascii%ef%bc%8cunicode%e5%92%8cutf-8","status":"publish","type":"post","link":"https:\/\/lordong.xyz\/wp\/post\/212.html","title":{"rendered":"\u8f6c\u8d34\uff1a\u5b57\u7b26\u7f16\u7801\u7b14\u8bb0\uff1aASCII\uff0cUnicode\u548cUTF-8"},"content":{"rendered":"<p>\u4f5c\u8005\uff1a\u962e\u4e00\u5cf0 \u53d1\u8868\u4e8e <a target=\"_blank\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2007\/10\/ascii_unicode_and_utf-8.html\">2007\u5e7410\u670828\u65e5<\/a><\/p>\n<p>\u4eca\u5929\u4e2d\u5348\uff0c\u6211\u7a81\u7136\u60f3\u641e\u6e05\u695aUnicode\u548cUTF-8\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u4e8e\u662f\u5c31\u5f00\u59cb\u5728\u7f51\u4e0a\u67e5\u8d44\u6599\u3002<\/p>\n<p>\u7ed3\u679c\uff0c\u8fd9\u4e2a\u95ee\u9898\u6bd4\u6211\u60f3\u8c61\u7684\u590d\u6742\uff0c\u4ece\u5348\u996d\u540e\u4e00\u76f4\u770b\u5230\u665a\u4e0a9\u70b9\uff0c\u624d\u7b97\u521d\u6b65\u641e\u6e05\u695a\u3002<\/p>\n<p>\u4e0b\u9762\u5c31\u662f\u6211\u7684\u7b14\u8bb0\uff0c\u4e3b\u8981\u7528\u6765\u6574\u7406\u81ea\u5df1\u7684\u601d\u8def\u3002\u4f46\u662f\uff0c\u6211\u5c3d\u91cf\u8bd5\u56fe\u5199\u5f97\u901a\u4fd7\u6613\u61c2\uff0c\u5e0c\u671b\u80fd\u5bf9\u5176\u4ed6\u670b\u53cb\u6709\u7528\u3002\u6bd5\u7adf\uff0c\u5b57\u7b26\u7f16\u7801\u662f\u8ba1\u7b97\u673a\u6280\u672f\u7684\u57fa\u77f3\uff0c\u60f3\u8981\u719f\u7ec3\u4f7f\u7528\u8ba1\u7b97\u673a\uff0c\u5c31\u5fc5\u987b\u61c2\u5f97\u4e00\u70b9\u5b57\u7b26\u7f16\u7801\u7684\u77e5\u8bc6\u3002<\/p>\n<p><strong>1. ASCII\u7801<\/strong><\/p>\n<p>\u6211\u4eec\u77e5\u9053\uff0c\u5728\u8ba1\u7b97\u673a\u5185\u90e8\uff0c\u6240\u6709\u7684\u4fe1\u606f\u6700\u7ec8\u90fd\u8868\u793a\u4e3a\u4e00\u4e2a\u4e8c\u8fdb\u5236\u7684\u5b57\u7b26\u4e32\u3002\u6bcf\u4e00\u4e2a\u4e8c\u8fdb\u5236\u4f4d\uff08bit\uff09\u67090\u548c1\u4e24\u79cd\u72b6\u6001\uff0c\u56e0\u6b64\u516b\u4e2a\u4e8c\u8fdb\u5236\u4f4d\u5c31\u53ef\u4ee5\u7ec4\u5408\u51fa256\u79cd\u72b6\u6001\uff0c\u8fd9\u88ab\u79f0\u4e3a\u4e00\u4e2a\u5b57\u8282\uff08byte\uff09\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e00\u4e2a\u5b57\u8282\u4e00\u5171\u53ef\u4ee5\u7528\u6765\u8868\u793a256\u79cd\u4e0d\u540c\u7684\u72b6\u6001\uff0c\u6bcf\u4e00\u4e2a\u72b6\u6001\u5bf9\u5e94\u4e00\u4e2a\u7b26\u53f7\uff0c\u5c31\u662f256\u4e2a\u7b26\u53f7\uff0c\u4ece0000000\u523011111111\u3002<\/p>\n<p>\u4e0a\u4e2a\u4e16\u7eaa60\u5e74\u4ee3\uff0c\u7f8e\u56fd\u5236\u5b9a\u4e86\u4e00\u5957\u5b57\u7b26\u7f16\u7801\uff0c\u5bf9\u82f1\u8bed\u5b57\u7b26\u4e0e\u4e8c\u8fdb\u5236\u4f4d\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u505a\u4e86\u7edf\u4e00\u89c4\u5b9a\u3002\u8fd9\u88ab\u79f0\u4e3aASCII\u7801\uff0c\u4e00\u76f4\u6cbf\u7528\u81f3\u4eca\u3002<\/p>\n<p>ASCII\u7801\u4e00\u5171\u89c4\u5b9a\u4e86128\u4e2a\u5b57\u7b26\u7684\u7f16\u7801\uff0c\u6bd4\u5982\u7a7a\u683c&ldquo;SPACE&rdquo;\u662f32\uff08\u4e8c\u8fdb\u523600100000\uff09\uff0c\u5927\u5199\u7684\u5b57\u6bcdA\u662f65\uff08\u4e8c\u8fdb\u523601000001\uff09\u3002\u8fd9128\u4e2a\u7b26\u53f7\uff08\u5305\u62ec32\u4e2a\u4e0d\u80fd\u6253\u5370\u51fa\u6765\u7684\u63a7\u5236\u7b26\u53f7\uff09\uff0c\u53ea\u5360\u7528\u4e86\u4e00\u4e2a\u5b57\u8282\u7684\u540e\u97627\u4f4d\uff0c\u6700\u524d\u9762\u76841\u4f4d\u7edf\u4e00\u89c4\u5b9a\u4e3a0\u3002<\/p>\n<p><strong>2\u3001\u975eASCII\u7f16\u7801<\/strong><\/p>\n<p>\u82f1\u8bed\u7528128\u4e2a\u7b26\u53f7\u7f16\u7801\u5c31\u591f\u4e86\uff0c\u4f46\u662f\u7528\u6765\u8868\u793a\u5176\u4ed6\u8bed\u8a00\uff0c128\u4e2a\u7b26\u53f7\u662f\u4e0d\u591f\u7684\u3002\u6bd4\u5982\uff0c\u5728\u6cd5\u8bed\u4e2d\uff0c\u5b57\u6bcd\u4e0a\u65b9\u6709\u6ce8\u97f3\u7b26\u53f7\uff0c\u5b83\u5c31\u65e0\u6cd5\u7528ASCII\u7801\u8868\u793a\u3002\u4e8e\u662f\uff0c\u4e00\u4e9b\u6b27\u6d32\u56fd\u5bb6\u5c31\u51b3\u5b9a\uff0c\u5229\u7528\u5b57\u8282\u4e2d\u95f2\u7f6e\u7684\u6700\u9ad8\u4f4d\u7f16\u5165\u65b0\u7684\u7b26\u53f7\u3002\u6bd4\u5982\uff0c\u6cd5\u8bed\u4e2d\u7684&eacute;\u7684\u7f16\u7801\u4e3a130\uff08\u4e8c\u8fdb\u523610000010\uff09\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u8fd9\u4e9b\u6b27\u6d32\u56fd\u5bb6\u4f7f\u7528\u7684\u7f16\u7801\u4f53\u7cfb\uff0c\u53ef\u4ee5\u8868\u793a\u6700\u591a256\u4e2a\u7b26\u53f7\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u8fd9\u91cc\u53c8\u51fa\u73b0\u4e86\u65b0\u7684\u95ee\u9898\u3002\u4e0d\u540c\u7684\u56fd\u5bb6\u6709\u4e0d\u540c\u7684\u5b57\u6bcd\uff0c\u56e0\u6b64\uff0c\u54ea\u6015\u5b83\u4eec\u90fd\u4f7f\u7528256\u4e2a\u7b26\u53f7\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u4ee3\u8868\u7684\u5b57\u6bcd\u5374\u4e0d\u4e00\u6837\u3002\u6bd4\u5982\uff0c130\u5728\u6cd5\u8bed\u7f16\u7801\u4e2d\u4ee3\u8868\u4e86&eacute;\uff0c\u5728\u5e0c\u4f2f\u6765\u8bed\u7f16\u7801\u4e2d\u5374\u4ee3\u8868\u4e86\u5b57\u6bcdGimel (\u05d2)\uff0c\u5728\u4fc4\u8bed\u7f16\u7801\u4e2d\u53c8\u4f1a\u4ee3\u8868\u53e6\u4e00\u4e2a\u7b26\u53f7\u3002\u4f46\u662f\u4e0d\u7ba1\u600e\u6837\uff0c\u6240\u6709\u8fd9\u4e9b\u7f16\u7801\u65b9\u5f0f\u4e2d\uff0c0&mdash;127\u8868\u793a\u7684\u7b26\u53f7\u662f\u4e00\u6837\u7684\uff0c\u4e0d\u4e00\u6837\u7684\u53ea\u662f128&mdash;255\u7684\u8fd9\u4e00\u6bb5\u3002<\/p>\n<p>\u81f3\u4e8e\u4e9a\u6d32\u56fd\u5bb6\u7684\u6587\u5b57\uff0c\u4f7f\u7528\u7684\u7b26\u53f7\u5c31\u66f4\u591a\u4e86\uff0c\u6c49\u5b57\u5c31\u591a\u8fbe10\u4e07\u5de6\u53f3\u3002\u4e00\u4e2a\u5b57\u8282\u53ea\u80fd\u8868\u793a256\u79cd\u7b26\u53f7\uff0c\u80af\u5b9a\u662f\u4e0d\u591f\u7684\uff0c\u5c31\u5fc5\u987b\u4f7f\u7528\u591a\u4e2a\u5b57\u8282\u8868\u8fbe\u4e00\u4e2a\u7b26\u53f7\u3002\u6bd4\u5982\uff0c\u7b80\u4f53\u4e2d\u6587\u5e38\u89c1\u7684\u7f16\u7801\u65b9\u5f0f\u662fGB2312\uff0c\u4f7f\u7528\u4e24\u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u6c49\u5b57\uff0c\u6240\u4ee5\u7406\u8bba\u4e0a\u6700\u591a\u53ef\u4ee5\u8868\u793a256x256=65536\u4e2a\u7b26\u53f7\u3002<\/p>\n<p>\u4e2d\u6587\u7f16\u7801\u7684\u95ee\u9898\u9700\u8981\u4e13\u6587\u8ba8\u8bba\uff0c\u8fd9\u7bc7\u7b14\u8bb0\u4e0d\u6d89\u53ca\u3002\u8fd9\u91cc\u53ea\u6307\u51fa\uff0c\u867d\u7136\u90fd\u662f\u7528\u591a\u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u7b26\u53f7\uff0c\u4f46\u662fGB\u7c7b\u7684\u6c49\u5b57\u7f16\u7801\u4e0e\u540e\u6587\u7684Unicode\u548cUTF-8\u662f\u6beb\u65e0\u5173\u7cfb\u7684\u3002<\/p>\n<p><strong>3.Unicode<\/strong><\/p>\n<p>\u6b63\u5982\u4e0a\u4e00\u8282\u6240\u8bf4\uff0c\u4e16\u754c\u4e0a\u5b58\u5728\u7740\u591a\u79cd\u7f16\u7801\u65b9\u5f0f\uff0c\u540c\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u5b57\u53ef\u4ee5\u88ab\u89e3\u91ca\u6210\u4e0d\u540c\u7684\u7b26\u53f7\u3002\u56e0\u6b64\uff0c\u8981\u60f3\u6253\u5f00\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5c31\u5fc5\u987b\u77e5\u9053\u5b83\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u5426\u5219\u7528\u9519\u8bef\u7684\u7f16\u7801\u65b9\u5f0f\u89e3\u8bfb\uff0c\u5c31\u4f1a\u51fa\u73b0\u4e71\u7801\u3002\u4e3a\u4ec0\u4e48\u7535\u5b50\u90ae\u4ef6\u5e38\u5e38\u51fa\u73b0\u4e71\u7801\uff1f\u5c31\u662f\u56e0\u4e3a\u53d1\u4fe1\u4eba\u548c\u6536\u4fe1\u4eba\u4f7f\u7528\u7684\u7f16\u7801\u65b9\u5f0f\u4e0d\u4e00\u6837\u3002<\/p>\n<p>\u53ef\u4ee5\u60f3\u8c61\uff0c\u5982\u679c\u6709\u4e00\u79cd\u7f16\u7801\uff0c\u5c06\u4e16\u754c\u4e0a\u6240\u6709\u7684\u7b26\u53f7\u90fd\u7eb3\u5165\u5176\u4e2d\u3002\u6bcf\u4e00\u4e2a\u7b26\u53f7\u90fd\u7ed9\u4e88\u4e00\u4e2a\u72ec\u4e00\u65e0\u4e8c\u7684\u7f16\u7801\uff0c\u90a3\u4e48\u4e71\u7801\u95ee\u9898\u5c31\u4f1a\u6d88\u5931\u3002\u8fd9\u5c31\u662fUnicode\uff0c\u5c31\u50cf\u5b83\u7684\u540d\u5b57\u90fd\u8868\u793a\u7684\uff0c\u8fd9\u662f\u4e00\u79cd\u6240\u6709\u7b26\u53f7\u7684\u7f16\u7801\u3002<\/p>\n<p>Unicode\u5f53\u7136\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u96c6\u5408\uff0c\u73b0\u5728\u7684\u89c4\u6a21\u53ef\u4ee5\u5bb9\u7eb3100\u591a\u4e07\u4e2a\u7b26\u53f7\u3002\u6bcf\u4e2a\u7b26\u53f7\u7684\u7f16\u7801\u90fd\u4e0d\u4e00\u6837\uff0c\u6bd4\u5982\uff0cU+0639\u8868\u793a\u963f\u62c9\u4f2f\u5b57\u6bcdAin\uff0cU+0041\u8868\u793a\u82f1\u8bed\u7684\u5927\u5199\u5b57\u6bcdA\uff0cU+4E25\u8868\u793a\u6c49\u5b57&ldquo;\u4e25&rdquo;\u3002\u5177\u4f53\u7684\u7b26\u53f7\u5bf9\u5e94\u8868\uff0c\u53ef\u4ee5\u67e5\u8be2<a target=\"_blank\" href=\"http:\/\/www.unicode.org\/\">unicode.org<\/a>\uff0c\u6216\u8005\u4e13\u95e8\u7684<a target=\"_blank\" href=\"http:\/\/www.chi2ko.com\/tool\/CJK.htm\">\u6c49\u5b57\u5bf9\u5e94\u8868<\/a>\u3002<\/p>\n<p><strong>4. Unicode\u7684\u95ee\u9898<\/strong><\/p>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0cUnicode\u53ea\u662f\u4e00\u4e2a\u7b26\u53f7\u96c6\uff0c\u5b83\u53ea\u89c4\u5b9a\u4e86\u7b26\u53f7\u7684\u4e8c\u8fdb\u5236\u4ee3\u7801\uff0c\u5374\u6ca1\u6709\u89c4\u5b9a\u8fd9\u4e2a\u4e8c\u8fdb\u5236\u4ee3\u7801\u5e94\u8be5\u5982\u4f55\u5b58\u50a8\u3002<\/p>\n<p>\u6bd4\u5982\uff0c\u6c49\u5b57&ldquo;\u4e25&rdquo;\u7684unicode\u662f\u5341\u516d\u8fdb\u5236\u65704E25\uff0c\u8f6c\u6362\u6210\u4e8c\u8fdb\u5236\u6570\u8db3\u8db3\u670915\u4f4d\uff08100111000100101\uff09\uff0c\u4e5f\u5c31\u662f\u8bf4\u8fd9\u4e2a\u7b26\u53f7\u7684\u8868\u793a\u81f3\u5c11\u9700\u89812\u4e2a\u5b57\u8282\u3002\u8868\u793a\u5176\u4ed6\u66f4\u5927\u7684\u7b26\u53f7\uff0c\u53ef\u80fd\u9700\u89813\u4e2a\u5b57\u8282\u6216\u80054\u4e2a\u5b57\u8282\uff0c\u751a\u81f3\u66f4\u591a\u3002<\/p>\n<p>\u8fd9\u91cc\u5c31\u6709\u4e24\u4e2a\u4e25\u91cd\u7684\u95ee\u9898\uff0c\u7b2c\u4e00\u4e2a\u95ee\u9898\u662f\uff0c\u5982\u4f55\u624d\u80fd\u533a\u522bunicode\u548cascii\uff1f\u8ba1\u7b97\u673a\u600e\u4e48\u77e5\u9053\u4e09\u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u7b26\u53f7\uff0c\u800c\u4e0d\u662f\u5206\u522b\u8868\u793a\u4e09\u4e2a\u7b26\u53f7\u5462\uff1f\u7b2c\u4e8c\u4e2a\u95ee\u9898\u662f\uff0c\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\uff0c\u82f1\u6587\u5b57\u6bcd\u53ea\u7528\u4e00\u4e2a\u5b57\u8282\u8868\u793a\u5c31\u591f\u4e86\uff0c\u5982\u679cunicode\u7edf\u4e00\u89c4\u5b9a\uff0c\u6bcf\u4e2a\u7b26\u53f7\u7528\u4e09\u4e2a\u6216\u56db\u4e2a\u5b57\u8282\u8868\u793a\uff0c\u90a3\u4e48\u6bcf\u4e2a\u82f1\u6587\u5b57\u6bcd\u524d\u90fd\u5fc5\u7136\u6709\u4e8c\u5230\u4e09\u4e2a\u5b57\u8282\u662f0\uff0c\u8fd9\u5bf9\u4e8e\u5b58\u50a8\u6765\u8bf4\u662f\u6781\u5927\u7684\u6d6a\u8d39\uff0c\u6587\u672c\u6587\u4ef6\u7684\u5927\u5c0f\u4f1a\u56e0\u6b64\u5927\u51fa\u4e8c\u4e09\u500d\uff0c\u8fd9\u662f\u65e0\u6cd5\u63a5\u53d7\u7684\u3002<\/p>\n<p>\u5b83\u4eec\u9020\u6210\u7684\u7ed3\u679c\u662f\uff1a1\uff09\u51fa\u73b0\u4e86unicode\u7684\u591a\u79cd\u5b58\u50a8\u65b9\u5f0f\uff0c\u4e5f\u5c31\u662f\u8bf4\u6709\u8bb8\u591a\u79cd\u4e0d\u540c\u7684\u4e8c\u8fdb\u5236\u683c\u5f0f\uff0c\u53ef\u4ee5\u7528\u6765\u8868\u793aunicode\u30022\uff09unicode\u5728\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u5185\u65e0\u6cd5\u63a8\u5e7f\uff0c\u76f4\u5230\u4e92\u8054\u7f51\u7684\u51fa\u73b0\u3002<\/p>\n<p><strong>5.UTF-8<\/strong><\/p>\n<p>\u4e92\u8054\u7f51\u7684\u666e\u53ca\uff0c\u5f3a\u70c8\u8981\u6c42\u51fa\u73b0\u4e00\u79cd\u7edf\u4e00\u7684\u7f16\u7801\u65b9\u5f0f\u3002UTF-8\u5c31\u662f\u5728\u4e92\u8054\u7f51\u4e0a\u4f7f\u7528\u6700\u5e7f\u7684\u4e00\u79cdunicode\u7684\u5b9e\u73b0\u65b9\u5f0f\u3002\u5176\u4ed6\u5b9e\u73b0\u65b9\u5f0f\u8fd8\u5305\u62ecUTF-16\u548cUTF-32\uff0c\u4e0d\u8fc7\u5728\u4e92\u8054\u7f51\u4e0a\u57fa\u672c\u4e0d\u7528\u3002<strong>\u91cd\u590d\u4e00\u904d\uff0c\u8fd9\u91cc\u7684\u5173\u7cfb\u662f\uff0cUTF-8\u662fUnicode\u7684\u5b9e\u73b0\u65b9\u5f0f\u4e4b\u4e00\u3002<\/strong><\/p>\n<p>UTF-8\u6700\u5927\u7684\u4e00\u4e2a\u7279\u70b9\uff0c\u5c31\u662f\u5b83\u662f\u4e00\u79cd\u53d8\u957f\u7684\u7f16\u7801\u65b9\u5f0f\u3002\u5b83\u53ef\u4ee5\u4f7f\u75281~4\u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u7b26\u53f7\uff0c\u6839\u636e\u4e0d\u540c\u7684\u7b26\u53f7\u800c\u53d8\u5316\u5b57\u8282\u957f\u5ea6\u3002<\/p>\n<p>UTF-8\u7684\u7f16\u7801\u89c4\u5219\u5f88\u7b80\u5355\uff0c\u53ea\u6709\u4e8c\u6761\uff1a<\/p>\n<p>1\uff09\u5bf9\u4e8e\u5355\u5b57\u8282\u7684\u7b26\u53f7\uff0c\u5b57\u8282\u7684\u7b2c\u4e00\u4f4d\u8bbe\u4e3a0\uff0c\u540e\u97627\u4f4d\u4e3a\u8fd9\u4e2a\u7b26\u53f7\u7684unicode\u7801\u3002\u56e0\u6b64\u5bf9\u4e8e\u82f1\u8bed\u5b57\u6bcd\uff0cUTF-8\u7f16\u7801\u548cASCII\u7801\u662f\u76f8\u540c\u7684\u3002<\/p>\n<p>2\uff09\u5bf9\u4e8en\u5b57\u8282\u7684\u7b26\u53f7\uff08n&gt;1\uff09\uff0c\u7b2c\u4e00\u4e2a\u5b57\u8282\u7684\u524dn\u4f4d\u90fd\u8bbe\u4e3a1\uff0c\u7b2cn+1\u4f4d\u8bbe\u4e3a0\uff0c\u540e\u9762\u5b57\u8282\u7684\u524d\u4e24\u4f4d\u4e00\u5f8b\u8bbe\u4e3a10\u3002\u5269\u4e0b\u7684\u6ca1\u6709\u63d0\u53ca\u7684\u4e8c\u8fdb\u5236\u4f4d\uff0c\u5168\u90e8\u4e3a\u8fd9\u4e2a\u7b26\u53f7\u7684unicode\u7801\u3002<\/p>\n<p>\u4e0b\u8868\u603b\u7ed3\u4e86\u7f16\u7801\u89c4\u5219\uff0c\u5b57\u6bcdx\u8868\u793a\u53ef\u7528\u7f16\u7801\u7684\u4f4d\u3002<\/p>\n<blockquote>\n<div>\n<p>Unicode\u7b26\u53f7\u8303\u56f4 | UTF-8\u7f16\u7801\u65b9\u5f0f<br \/>(\u5341\u516d\u8fdb\u5236) | \uff08\u4e8c\u8fdb\u5236\uff09<br \/>--------------------+---------------------------------------------<br \/>0000 0000-0000 007F | 0xxxxxxx<br \/>0000 0080-0000 07FF | 110xxxxx 10xxxxxx<br \/>0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx<br \/>0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx<\/p>\n<\/div>\n<\/blockquote>\n<p>\u4e0b\u9762\uff0c\u8fd8\u662f\u4ee5\u6c49\u5b57&ldquo;\u4e25&rdquo;\u4e3a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u5b9e\u73b0UTF-8\u7f16\u7801\u3002<\/p>\n<p>\u5df2\u77e5&ldquo;\u4e25&rdquo;\u7684unicode\u662f4E25\uff08100111000100101\uff09\uff0c\u6839\u636e\u4e0a\u8868\uff0c\u53ef\u4ee5\u53d1\u73b04E25\u5904\u5728\u7b2c\u4e09\u884c\u7684\u8303\u56f4\u5185\uff080000 0800-0000 FFFF\uff09\uff0c\u56e0\u6b64&ldquo;\u4e25&rdquo;\u7684UTF-8\u7f16\u7801\u9700\u8981\u4e09\u4e2a\u5b57\u8282\uff0c\u5373\u683c\u5f0f\u662f&ldquo;1110xxxx 10xxxxxx 10xxxxxx&rdquo;\u3002\u7136\u540e\uff0c\u4ece&ldquo;\u4e25&rdquo;\u7684\u6700\u540e\u4e00\u4e2a\u4e8c\u8fdb\u5236\u4f4d\u5f00\u59cb\uff0c\u4f9d\u6b21\u4ece\u540e\u5411\u524d\u586b\u5165\u683c\u5f0f\u4e2d\u7684x\uff0c\u591a\u51fa\u7684\u4f4d\u88650\u3002\u8fd9\u6837\u5c31\u5f97\u5230\u4e86\uff0c&ldquo;\u4e25&rdquo;\u7684UTF-8\u7f16\u7801\u662f&ldquo;11100100 10111000 10100101&rdquo;\uff0c\u8f6c\u6362\u6210\u5341\u516d\u8fdb\u5236\u5c31\u662fE4B8A5\u3002<\/p>\n<p><strong>6. Unicode\u4e0eUTF-8\u4e4b\u95f4\u7684\u8f6c\u6362<\/strong><\/p>\n<p>\u901a\u8fc7\u4e0a\u4e00\u8282\u7684\u4f8b\u5b50\uff0c\u53ef\u4ee5\u770b\u5230&ldquo;\u4e25&rdquo;\u7684Unicode\u7801\u662f4E25\uff0cUTF-8\u7f16\u7801\u662fE4B8A5\uff0c\u4e24\u8005\u662f\u4e0d\u4e00\u6837\u7684\u3002\u5b83\u4eec\u4e4b\u95f4\u7684\u8f6c\u6362\u53ef\u4ee5\u901a\u8fc7\u7a0b\u5e8f\u5b9e\u73b0\u3002<\/p>\n<p>\u5728Windows\u5e73\u53f0\u4e0b\uff0c\u6709\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u8f6c\u5316\u65b9\u6cd5\uff0c\u5c31\u662f\u4f7f\u7528\u5185\u7f6e\u7684\u8bb0\u4e8b\u672c\u5c0f\u7a0b\u5e8fNotepad.exe\u3002\u6253\u5f00\u6587\u4ef6\u540e\uff0c\u70b9\u51fb&ldquo;\u6587\u4ef6&rdquo;\u83dc\u5355\u4e2d\u7684&ldquo;\u53e6\u5b58\u4e3a&rdquo;\u547d\u4ee4\uff0c\u4f1a\u8df3\u51fa\u4e00\u4e2a\u5bf9\u8bdd\u6846\uff0c\u5728\u6700\u5e95\u90e8\u6709\u4e00\u4e2a&ldquo;\u7f16\u7801&rdquo;\u7684\u4e0b\u62c9\u6761\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/media\/200904101509337405.gif\" alt=\"\" title=\"\"\/><\/p>\n<p>\u91cc<br \/>\n\u9762\u6709\u56db\u4e2a\u9009\u9879\uff1aANSI\uff0cUnicode\uff0cUnicode big endian \u548c UTF-8\u3002<\/p>\n<p>1\uff09ANSI\u662f\u9ed8\u8ba4\u7684\u7f16\u7801\u65b9\u5f0f\u3002\u5bf9\u4e8e\u82f1\u6587\u6587\u4ef6\u662fASCII\u7f16\u7801\uff0c\u5bf9\u4e8e\u7b80\u4f53\u4e2d\u6587\u6587\u4ef6\u662fGB2312\u7f16\u7801\uff08\u53ea\u9488\u5bf9Windows\u7b80\u4f53\u4e2d\u6587\u7248\uff0c\u5982\u679c\u662f\u7e41\u4f53\u4e2d\u6587\u7248\u4f1a\u91c7\u7528Big5\u7801\uff09\u3002<\/p>\n<p>2\uff09Unicode\u7f16\u7801\u6307\u7684\u662fUCS-2\u7f16\u7801\u65b9\u5f0f\uff0c\u5373\u76f4\u63a5\u7528\u4e24\u4e2a\u5b57\u8282\u5b58\u5165\u5b57\u7b26\u7684Unicode\u7801\u3002\u8fd9\u4e2a\u9009\u9879\u7528\u7684little endian\u683c\u5f0f\u3002<\/p>\n<p>3\uff09Unicode big endian\u7f16\u7801\u4e0e\u4e0a\u4e00\u4e2a\u9009\u9879\u76f8\u5bf9\u5e94\u3002\u6211\u5728\u4e0b\u4e00\u8282\u4f1a\u89e3\u91calittle endian\u548cbig endian\u7684\u6db5\u4e49\u3002<\/p>\n<p>4\uff09UTF-8\u7f16\u7801\uff0c\u4e5f\u5c31\u662f\u4e0a\u4e00\u8282\u8c08\u5230\u7684\u7f16\u7801\u65b9\u6cd5\u3002<\/p>\n<p>\u9009\u62e9\u5b8c&rdquo;\u7f16\u7801\u65b9\u5f0f&ldquo;\u540e\uff0c\u70b9\u51fb&rdquo;\u4fdd\u5b58&ldquo;\u6309\u94ae\uff0c\u6587\u4ef6\u7684\u7f16\u7801\u65b9\u5f0f\u5c31\u7acb\u523b\u8f6c\u6362\u597d\u4e86\u3002<\/p>\n<p><strong>7. Little endian\u548cBig endian<\/strong><\/p>\n<p>\u4e0a\u4e00\u8282\u5df2\u7ecf\u63d0\u5230\uff0cUnicode\u7801\u53ef\u4ee5\u91c7\u7528UCS-2\u683c\u5f0f\u76f4\u63a5\u5b58\u50a8\u3002\u4ee5\u6c49\u5b57&rdquo;\u4e25&ldquo;\u4e3a\u4f8b\uff0cUnicode\u7801\u662f4E25\uff0c\u9700\u8981\u7528\u4e24\u4e2a\u5b57\u8282\u5b58\u50a8\uff0c\u4e00\u4e2a\u5b57\u8282\u662f4E\uff0c\u53e6\u4e00\u4e2a\u5b57\u8282\u662f25\u3002\u5b58\u50a8\u7684\u65f6\u5019\uff0c4E\u5728\u524d\uff0c25\u5728\u540e\uff0c\u5c31\u662fBig endian\u65b9\u5f0f\uff1b25\u5728\u524d\uff0c4E\u5728\u540e\uff0c\u5c31\u662fLittle endian\u65b9\u5f0f\u3002<\/p>\n<p>\u8fd9\u4e24\u4e2a\u53e4\u602a\u7684\u540d\u79f0\u6765\u81ea\u82f1\u56fd\u4f5c\u5bb6\u65af\u5a01\u592b\u7279\u7684\u300a\u683c\u5217\u4f5b\u6e38\u8bb0\u300b\u3002\u5728\u8be5\u4e66\u4e2d\uff0c\u5c0f\u4eba\u56fd\u91cc\u7206\u53d1\u4e86\u5185\u6218\uff0c\u6218\u4e89\u8d77\u56e0\u662f\u4eba\u4eec\u4e89\u8bba\uff0c\u5403\u9e21\u86cb\u65f6\u7a76\u7adf\u662f\u4ece\u5927\u5934(Big-Endian)\u6572\u5f00\u8fd8\u662f\u4ece\u5c0f\u5934(Little-Endian)\u6572\u5f00\u3002\u4e3a\u4e86\u8fd9\u4ef6\u4e8b\u60c5\uff0c\u524d\u540e\u7206\u53d1\u4e86\u516d\u6b21\u6218\u4e89\uff0c\u4e00\u4e2a\u7687\u5e1d\u9001\u4e86\u547d\uff0c\u53e6\u4e00\u4e2a\u7687\u5e1d\u4e22\u4e86\u738b\u4f4d\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u7b2c\u4e00\u4e2a\u5b57\u8282\u5728\u524d\uff0c\u5c31\u662f&rdquo;\u5927\u5934\u65b9\u5f0f&ldquo;\uff08Big endian\uff09\uff0c\u7b2c\u4e8c\u4e2a\u5b57\u8282\u5728\u524d\u5c31\u662f&rdquo;\u5c0f\u5934\u65b9\u5f0f&ldquo;\uff08Little endian\uff09\u3002<\/p>\n<p>\u90a3\u4e48\u5f88\u81ea\u7136\u7684\uff0c\u5c31\u4f1a\u51fa\u73b0\u4e00\u4e2a\u95ee\u9898\uff1a\u8ba1\u7b97\u673a\u600e\u4e48\u77e5\u9053\u67d0\u4e00\u4e2a\u6587\u4ef6\u5230\u5e95\u91c7\u7528\u54ea\u4e00\u79cd\u65b9\u5f0f\u7f16\u7801\uff1f<\/p>\n<p>Unicode\u89c4\u8303\u4e2d\u5b9a\u4e49\uff0c\u6bcf\u4e00\u4e2a\u6587\u4ef6\u7684\u6700\u524d\u9762\u5206\u522b\u52a0\u5165\u4e00\u4e2a\u8868\u793a\u7f16\u7801\u987a\u5e8f\u7684\u5b57\u7b26\uff0c\u8fd9\u4e2a\u5b57\u7b26\u7684\u540d\u5b57\u53eb\u505a&rdquo;\u96f6\u5bbd\u5ea6\u975e\u6362\u884c\u7a7a\u683c&ldquo;\uff08ZERO WIDTH NO-BREAK SPACE\uff09\uff0c\u7528FEFF\u8868\u793a\u3002\u8fd9\u6b63\u597d\u662f\u4e24\u4e2a\u5b57\u8282\uff0c\u800c\u4e14FF\u6bd4FE\u59271\u3002<\/p>\n<p>\u5982\u679c\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u7684\u5934\u4e24\u4e2a\u5b57\u8282\u662fFE FF\uff0c\u5c31\u8868\u793a\u8be5\u6587\u4ef6\u91c7\u7528\u5927\u5934\u65b9\u5f0f\uff1b\u5982\u679c\u5934\u4e24\u4e2a\u5b57\u8282\u662fFF FE\uff0c\u5c31\u8868\u793a\u8be5\u6587\u4ef6\u91c7\u7528\u5c0f\u5934\u65b9\u5f0f\u3002<\/p>\n<p><strong>8. \u5b9e\u4f8b<\/strong><\/p>\n<p>\u4e0b\u9762\uff0c\u4e3e\u4e00\u4e2a\u5b9e\u4f8b\u3002<\/p>\n<p>\u6253\u5f00&rdquo;\u8bb0\u4e8b\u672c&ldquo;\u7a0b\u5e8fNotepad.exe\uff0c\u65b0\u5efa\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5185\u5bb9\u5c31\u662f\u4e00\u4e2a&rdquo;\u4e25&ldquo;\u5b57\uff0c\u4f9d\u6b21\u91c7\u7528ANSI\uff0cUnicode\uff0cUnicode big endian \u548c UTF-8\u7f16\u7801\u65b9\u5f0f\u4fdd\u5b58\u3002<\/p>\n<p>\u7136\u540e\uff0c\u7528\u6587\u672c\u7f16\u8f91\u8f6f\u4ef6<a target=\"_blank\" href=\"http:\/\/www.google.cn\/search?aq=t&amp;oq=UltraEdit&amp;complete=1&amp;hl=zh-CN&amp;newwindow=1&amp;rlz=1B3GGGL_zh-CNCN216CN216&amp;q=ultraedit+%E4%B8%8B%E8%BD%BD&amp;btnG=Google+%E6%90%9C%E7%B4%A2&amp;meta=\">UltraEdit\u4e2d<\/a>\u7684&rdquo;\u5341\u516d\u8fdb\u5236\u529f\u80fd&ldquo;\uff0c\u89c2\u5bdf\u8be5\u6587\u4ef6\u7684\u5185\u90e8\u7f16\u7801\u65b9\u5f0f\u3002<\/p>\n<p>1\uff09ANSI\uff1a\u6587\u4ef6\u7684\u7f16\u7801\u5c31\u662f\u4e24\u4e2a\u5b57\u8282&ldquo;D1 CF&rdquo;\uff0c\u8fd9\u6b63\u662f&ldquo;\u4e25&rdquo;\u7684GB2312\u7f16\u7801\uff0c\u8fd9\u4e5f\u6697\u793aGB2312\u662f\u91c7\u7528\u5927\u5934\u65b9\u5f0f\u5b58\u50a8\u7684\u3002<\/p>\n<p>2\uff09Unicode\uff1a\u7f16\u7801\u662f\u56db\u4e2a\u5b57\u8282&ldquo;FF FE 25 4E&rdquo;\uff0c\u5176\u4e2d&ldquo;FF FE&rdquo;\u8868\u660e\u662f\u5c0f\u5934\u65b9\u5f0f\u5b58\u50a8\uff0c\u771f\u6b63\u7684\u7f16\u7801\u662f4E25\u3002<\/p>\n<p>3\uff09Unicode big endian\uff1a\u7f16\u7801\u662f\u56db\u4e2a\u5b57\u8282&ldquo;FE FF 4E 25&rdquo;\uff0c\u5176\u4e2d&ldquo;FE FF&rdquo;\u8868\u660e\u662f\u5927\u5934\u65b9\u5f0f\u5b58\u50a8\u3002<\/p>\n<p>4\uff09UTF-8\uff1a\u7f16\u7801\u662f\u516d\u4e2a\u5b57\u8282&ldquo;EF BB BF E4 B8 A5&rdquo;\uff0c\u524d\u4e09\u4e2a\u5b57\u8282&ldquo;EF BB BF&rdquo;\u8868\u793a\u8fd9\u662fUTF-8\u7f16\u7801\uff0c\u540e\u4e09\u4e2a&ldquo;E4B8A5&rdquo;\u5c31\u662f&ldquo;\u4e25&rdquo;\u7684\u5177\u4f53\u7f16\u7801\uff0c\u5b83\u7684\u5b58\u50a8\u987a\u5e8f\u4e0e\u7f16\u7801\u987a\u5e8f\u662f\u4e00\u81f4\u7684\u3002<\/p>\n<p><strong>9. \u5ef6\u4f38\u9605\u8bfb<\/strong><\/p>\n<p>* <a target=\"_blank\" href=\"http:\/\/www.joelonsoftware.com\/articles\/Unicode.html\">The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets<\/a>\uff08\u5173\u4e8e\u5b57\u7b26\u96c6\u7684\u6700\u57fa\u672c\u77e5\u8bc6\uff09<\/p>\n<p>* <a target=\"_blank\" href=\"http:\/\/www.pconline.com.cn\/pcedu\/empolder\/gj\/other\/0505\/616631.html\">\u8c08\u8c08Unicode\u7f16\u7801<\/a><\/p>\n<p>* <a target=\"_blank\" href=\"http:\/\/www.ietf.org\/rfc\/rfc3629.txt\">RFC3629\uff1aUTF-8, a transformation format of ISO 10646<\/a>\uff08\u5982\u679c\u5b9e\u73b0UTF-8\u7684\u89c4\u5b9a\uff09<\/p>\n<p>\uff08\u5b8c\uff09<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u962e\u4e00\u5cf0 \u53d1\u8868\u4e8e 2007\u5e7410\u670828\u65e5 \u4eca\u5929\u4e2d\u5348\uff0c\u6211\u7a81\u7136\u60f3\u641e\u6e05\u695aUnicode\u548cUTF-8\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u4e8e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92],"tags":[79],"class_list":["post-212","post","type-post","status-publish","format-standard","hentry","category-92","tag-79"],"_links":{"self":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":0,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/posts\/212\/revisions"}],"wp:attachment":[{"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/media?parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/categories?post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lordong.xyz\/wp\/wp-json\/wp\/v2\/tags?post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}