{"id":1570,"date":"2016-05-04T17:48:25","date_gmt":"2016-05-04T09:48:25","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=1570"},"modified":"2016-05-09T17:48:56","modified_gmt":"2016-05-09T09:48:56","slug":"%e5%ad%97%e7%ac%a6%e7%bc%96%e7%a0%81%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=1570","title":{"rendered":"\u5b57\u7b26\u7f16\u7801\u8be6\u89e3"},"content":{"rendered":"<p>\u968f\u7740\u8ba1\u7b97\u673a\u7684\u53d1\u5c55\u3001\u666e\u53ca\uff0c\u4e16\u754c\u5404\u56fd\u4e3a\u4e86\u9002\u5e94\u672c\u56fd\u7684\u8bed\u8a00\u548c\u5b57\u7b26\u90fd\u4f1a\u81ea\u5df1\u8bbe\u8ba1\u4e00\u5957\u81ea\u5df1\u7684\u7f16\u7801\u98ce\u683c\uff0c\u6b63\u662f\u7531\u4e8e\u8fd9\u79cd\u4e71\uff0c\u5bfc\u81f4\u5b58\u5728\u5f88\u591a\u79cd\u7f16\u7801\u65b9\u5f0f\uff0c\u4ee5\u81f3\u4e8e\u540c\u4e00\u4e2a\u4e8c\u8fdb\u5236\u6570\u5b57\u53ef\u80fd\u4f1a\u88ab\u89e3\u91ca\u6210\u4e0d\u540c\u7684\u7b26\u53f7\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u79cd\u4e0d\u517c\u5bb9\u7684\u95ee\u9898\uff0c\u4f1f\u5927\u7684\u521b\u60f3<strong>Unicode<\/strong>\u7f16\u7801\u5e94\u65f6\u800c\u751f\uff01\uff01<\/p>\n<h2>Unicode<\/h2>\n<p>Unicode\u53c8\u79f0\u4e3a\u7edf\u4e00\u7801\u3001\u4e07\u56fd\u7801\u3001\u5355\u4e00\u7801\uff0c\u5b83\u662f\u4e3a\u4e86\u89e3\u51b3\u4f20\u7edf\u7684\u5b57\u7b26\u7f16\u7801\u65b9\u6848\u7684\u5c40\u9650\u800c\u4ea7\u751f\u7684\uff0c\u5b83\u4e3a\u6bcf\u79cd\u8bed\u8a00\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8bbe\u5b9a\u4e86\u7edf\u4e00\u5e76\u4e14\u552f\u4e00\u7684\u4e8c\u8fdb\u5236\u7f16\u7801\uff0c\u4ee5\u6ee1\u8db3\u8de8\u8bed\u8a00\u3001\u8de8\u5e73\u53f0\u8fdb\u884c\u6587\u672c\u8f6c\u6362\u3001\u5904\u7406\u7684\u8981\u6c42\u3002\u53ef\u4ee5\u60f3\u8c61Unicode\u4f5c\u4e3a\u4e00\u4e2a\u201c\u5b57\u7b26\u5927\u5bb9\u5668\u201d\uff0c\u5b83\u5c06\u4e16\u754c\u4e0a\u6240\u6709\u7684\u7b26\u53f7\u90fd\u5305\u542b\u5176\u4e2d\uff0c\u5e76\u4e14\u6bcf\u4e00\u4e2a\u7b26\u53f7\u90fd\u6709\u81ea\u5df1\u72ec\u4e00\u65e0\u4e8c\u7684\u7f16\u7801\uff0c\u8fd9\u6837\u5c31\u4ece\u6839\u672c\u4e0a\u89e3\u51b3\u4e86\u4e71\u7801\u7684\u95ee\u9898\u3002\u6240\u4ee5<strong>Unicode\u662f\u4e00\u79cd\u6240\u6709\u7b26\u53f7\u7684\u7f16\u7801<\/strong><sup>[2]<\/sup>\u3002<\/p>\n<p>Unicode\u4f34\u968f\u7740\u901a\u7528\u5b57\u7b26\u96c6\u7684\u6807\u51c6\u800c\u53d1\u5c55\uff0c\u540c\u65f6\u4e5f\u4ee5\u4e66\u672c\u7684\u5f62\u5f0f\u5bf9\u5916\u53d1\u8868\uff0c\u5b83\u662f\u4e1a\u754c\u7684\u6807\u51c6\uff0c\u5bf9\u4e16\u754c\u4e0a\u5927\u90e8\u5206\u7684\u6587\u5b57\u7cfb\u7edf\u8fdb\u884c\u4e86\u6574\u7406\u3001\u7f16\u7801\uff0c\u4f7f\u5f97\u7535\u8111\u53ef\u4ee5\u7528\u66f4\u4e3a\u7b80\u5355\u7684\u65b9\u5f0f\u6765\u5448\u73b0\u548c\u5904\u7406\u6587\u5b57\u3002Unicode\u81f3\u4eca\u4ecd\u5728\u4e0d\u65ad\u589e\u4fee\uff0c\u8fc4\u4eca\u800c\u81f3\u5df2\u6536\u5165\u8d85\u8fc7\u5341\u4e07\u4e2a\u5b57\u7b26\uff0c\u5b83\u5907\u53d7\u4e1a\u754c\u8ba4\u53ef\uff0c\u5e76\u5e7f\u6cdb\u5730\u5e94\u7528\u4e8e\u7535\u8111\u8f6f\u4ef6\u7684\u56fd\u9645\u5316\u4e0e\u672c\u5730\u5316\u8fc7\u7a0b\u3002<\/p>\n<p>\u6211\u4eec\u77e5\u9053Unicode\u662f\u4e3a\u4e86\u89e3\u51b3\u4f20\u7edf\u7684\u5b57\u7b26\u7f16\u7801\u65b9\u6848\u7684\u5c40\u9650\u800c\u4ea7\u751f\u7684\uff0c\u5bf9\u4e8e\u4f20\u7edf\u7684\u7f16\u7801\u65b9\u5f0f\u800c\u8a00\uff0c\u4ed6\u4eec\u90fd\u5b58\u5728\u4e00\u4e2a\u5171\u540c\u7684\u95ee\u9898\uff1a\u65e0\u6cd5\u652f\u6301\u591a\u8bed\u8a00\u73af\u5883\uff0c\u8fd9\u5bf9\u4e8e\u4e92\u8054\u7f51\u8fd9\u4e2a\u5f00\u653e\u7684\u73af\u5883\u662f\u4e0d\u5141\u8bb8\u7684\u3002\u800c\u76ee\u524d\u51e0\u4e4e\u6240\u6709\u7684\u7535\u8111\u7cfb\u7edf\u90fd\u652f\u6301\u57fa\u672c\u62c9\u4e01\u5b57\u6bcd\uff0c\u5e76\u5404\u81ea\u652f\u6301\u4e0d\u540c\u7684\u5176\u4ed6\u7f16\u7801\u65b9\u5f0f\u3002Unicode\u4e3a\u4e86\u548c\u5b83\u4eec\u76f8\u4e92\u517c\u5bb9\uff0c\u5176\u9996256\u5b57\u7b26\u4fdd\u7559\u7ed9ISO 8859-1\u6240\u5b9a\u4e49\u7684\u5b57\u7b26\uff0c\u4f7f\u65e2\u6709\u7684\u897f\u6b27\u8bed\u7cfb\u6587\u5b57\u7684\u8f6c\u6362\u4e0d\u9700\u7279\u522b\u8003\u91cf\uff1b\u5e76\u4e14\u628a\u5927\u91cf\u76f8\u540c\u7684\u5b57\u7b26\u91cd\u590d\u7f16\u5230\u4e0d\u540c\u7684\u5b57\u7b26\u7801\u4e2d\u53bb\uff0c\u4f7f\u5f97\u65e7\u6709\u7eb7\u6742\u7684\u7f16\u7801\u65b9\u5f0f\u5f97\u4ee5\u548cUnicode\u7f16\u7801\u95f4\u4e92\u76f8\u76f4\u63a5\u8f6c\u6362\uff0c\u800c\u4e0d\u4f1a\u4e22\u5931\u4efb\u4f55\u4fe1\u606f<sup>[1]\u3002<\/sup><\/p>\n<h2>\u5b9e\u73b0\u65b9\u5f0f<\/h2>\n<p>\u4e00\u4e2a\u5b57\u7b26\u7684Unicode\u7f16\u7801\u662f\u786e\u5b9a\u7684\uff0c\u4f46\u662f\u5728\u5b9e\u9645\u4f20\u8f93\u8fc7\u7a0b\u4e2d\uff0c\u7531\u4e8e\u4e0d\u540c\u7cfb\u7edf\u5e73\u53f0\u7684\u8bbe\u8ba1\u4e0d\u4e00\u5b9a\u4e00\u81f4\uff0c\u4ee5\u53ca\u51fa\u4e8e\u8282\u7701\u7a7a\u95f4\u7684\u76ee\u7684\uff0c\u5bf9Unicode\u7f16\u7801\u7684\u5b9e\u73b0\u65b9\u5f0f\u6709\u6240\u4e0d\u540c\u3002Unicode\u7684\u5b9e\u73b0\u65b9\u5f0f\u79f0\u4e3a<strong>Unicode\u8f6c\u6362\u683c\u5f0f<\/strong>\uff08Unicode Transformation Format\uff0c\u7b80\u79f0\u4e3aUTF\uff09<sup>[1]<\/sup>\u3002<\/p>\n<p>Unicode\u662f\u5b57\u7b26\u96c6\uff0c\u5b83\u4e3b\u8981\u6709UTF-8\u3001UTF-16\u3001UTF-32\u4e09\u79cd\u5b9e\u73b0\u65b9\u5f0f\u3002\u7531\u4e8eUTF-8\u662f\u76ee\u524d\u4e3b\u6d41\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0cUTF-16\u3001UTF-32\u76f8\u5bf9\u800c\u8a00\u4f7f\u7528\u8f83\u5c11\uff0c\u6240\u4ee5\u4e0b\u9762\u5c31\u4e3b\u8981\u4ecb\u7ecdUTF-8\u3002<\/p>\n<h3>UCS<\/h3>\n<p>\u63d0\u5230Unicode\u53ef\u80fd\u6709\u5fc5\u8981\u4e86\u89e3\u4e0b\uff0cUCS\u3002UCS\uff08Universal Character Set\uff0c\u901a\u7528\u5b57\u7b26\u96c6\uff09\uff0c\u662f\u7531ISO\u5236\u5b9a\u7684<strong>ISO 10646<\/strong>\uff08\u6216\u79f0<strong>ISO\/IEC 10646<\/strong>\uff09\u6807\u51c6\u6240\u5b9a\u4e49\u7684\u6807\u51c6\u5b57\u7b26\u96c6\u3002\u5b83\u5305\u62ec\u4e86\u5176\u4ed6\u6240\u6709\u5b57\u7b26\u96c6\uff0c\u4fdd\u8bc1\u4e86\u4e0e\u5176\u4ed6\u5b57\u7b26\u96c6\u7684\u53cc\u5411\u517c\u5bb9\uff0c\u5373\uff0c\u5982\u679c\u4f60\u5c06\u4efb\u4f55\u6587\u672c\u5b57\u7b26\u4e32\u7ffb\u8bd1\u5230UCS\u683c\u5f0f\uff0c\u7136\u540e\u518d\u7ffb\u8bd1\u56de\u539f\u7f16\u7801\uff0c\u4f60\u4e0d\u4f1a\u4e22\u5931\u4efb\u4f55\u4fe1\u606f\u3002<\/p>\n<p>UCS\u4e0d\u4ec5\u7ed9\u6bcf\u4e2a\u5b57\u7b26\u5206\u914d\u4e00\u4e2a\u4ee3\u7801\uff0c\u800c\u4e14\u8d4b\u4e88\u4e86\u4e00\u4e2a\u6b63\u5f0f\u7684\u540d\u5b57\u3002\u8868\u793a\u4e00\u4e2aUCS\u6216Unicode\u503c\u7684\u5341\u516d\u8fdb\u5236\u6570\u901a\u5e38\u5728\u524d\u9762\u52a0\u4e0a\u201cU+\u201d\uff0c\u4f8b\u5982\u201cU+0041\u201d\u4ee3\u8868\u5b57\u7b26\u201cA\u201d\u3002<\/p>\n<h3><strong>Little endian &amp; Big endian<\/strong><\/h3>\n<p>\u7531\u4e8e\u5404\u4e2a\u7cfb\u7edf\u5e73\u53f0\u7684\u8bbe\u8ba1\u4e0d\u540c\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u67d0\u4e9b\u5e73\u53f0\u5bf9\u5b57\u7b26\u7684\u7406\u89e3\u4e0d\u540c\uff08\u6bd4\u5982\u5b57\u8282\u987a\u5e8f\u7684\u7406\u89e3\uff09\u3002\u8fd9\u65f6\u5c06\u4f1a\u5bfc\u81f4\u540c\u610f\u5b57\u8282\u6d41\u53ef\u80fd\u4f1a\u88ab\u89e3\u91ca\u4e3a\u4e0d\u540c\u7684\u5185\u5bb9\u3002\u5982\u67d0\u4e2a\u5b57\u7b26\u7684\u5341\u516d\u8fdb\u5236\u4e3a4E59\uff0c\u62c6\u5206\u4e3a4E\u300159\uff0c\u5728MAC\u4e0a\u8bfb\u53d6\u65f6\u662f\u6b27\u8bfa\u4e2a\u4f4e\u4f4d\u5f00\u59cb\u7684\uff0c\u90a3\u4e48MAC\u5728\u9047\u5230\u8be5\u5b57\u8282\u6d41\u65f6\u4f1a\u88ab\u89e3\u6790\u4e3a594E\uff0c\u627e\u5230\u7684\u5b57\u7b26\u4e3a\u201c\u594e\u201d\uff0c\u4f46\u662f\u5728Windows\u5e73\u53f0\u662f\u4ece\u9ad8\u5b57\u8282\u5f00\u59cb\u8bfb\u53d6\uff0c\u4e3a4E59\uff0c\u627e\u5230\u7684\u5b57\u7b26\u4e3a\u201c\u4e59\u201d\u3002\u4e5f\u5c31\u662f\u8bf4\u5728Windows\u5e73\u53f0\u4fdd\u5b58\u7684\u201c\u4e59\u201d\u8dd1\u5230MAC\u5e73\u53f0\u4e0a\u5c31\u53d8\u6210\u4e86\u201c\u594e\u201d\u3002\u8fd9\u6837\u52bf\u5fc5\u4f1a\u5f15\u8d77\u6df7\u4e71\uff0c\u4e8e\u662f\u5728Unicode\u7f16\u7801\u4e2d\u91c7\u7528\u4e86\u5927\u5934\uff08Big endian\uff09\u3001\u5c0f\u5934\uff08Little endian\uff09\u4e24\u79cd\u65b9\u5f0f\u6765\u8fdb\u884c\u533a\u5206\u3002\u5373\u7b2c\u4e00\u4e2a\u5b57\u8282\u5728\u524d\uff0c\u5c31\u662f\u5927\u5934\u65b9\u5f0f\uff0c\u7b2c\u4e8c\u4e2a\u5b57\u8282\u5728\u524d\u5c31\u662f\u5c0f\u5934\u65b9\u5f0f\u3002\u90a3\u4e48\u8fd9\u4e2a\u65f6\u5019\u5c31\u51fa\u73b0\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u8ba1\u7b97\u673a\u600e\u4e48\u77e5\u9053\u67d0\u4e2a\u6587\u4ef6\u5230\u5e95\u662f\u91c7\u7528\u54ea\u79cd\u7f16\u7801\u65b9\u5f0f\u7684\u5462\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\u201d\u96f6\u5bbd\u5ea6\u975e\u6362\u884c\u7a7a\u683c\u201d\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<h3>UTF-8<\/h3>\n<p>UTF-8\u662f\u4e00\u79cd\u9488\u5bf9Unicode\u7684\u53ef\u53d8\u957f\u5ea6\u5b57\u7b26\u7f16\u7801,\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\u5b83\u53ef\u4ee5\u7528\u6765\u8868\u793aUnicode\u6807\u51c6\u4e2d\u7684\u4efb\u4f55\u5b57\u7b26\uff0c\u4e14\u5176\u7f16\u7801\u4e2d\u7684\u7b2c\u4e00\u4e2a\u5b57\u8282\u4ecd\u4e0eASCII\u517c\u5bb9\uff0c\u8fd9\u4f7f\u5f97\u539f\u6765\u5904\u7406ASCII\u5b57\u7b26\u7684\u7cfb\u7edf\u65e0\u987b\u6216\u53ea\u987b\u505a\u5c11\u90e8\u4efd\u4fee\u6539\uff0c\u5373\u53ef\u7ee7\u7eed\u4f7f\u7528\u3002\u56e0\u6b64\uff0c\u5b83\u9010\u6e10\u6210\u4e3a\u7535\u5b50\u90ae\u4ef6\u3001\u7f51\u9875\u53ca\u5176\u4ed6\u5b58\u50a8\u6216\u4f20\u9001\u6587\u5b57\u7684\u5e94\u7528\u4e2d\uff0c\u4f18\u5148\u91c7\u7528\u7684\u7f16\u7801\u3002<\/p>\n<p>UTF-8\u4f7f\u7528\u4e00\u5230\u56db\u4e2a\u5b57\u8282\u4e3a\u6bcf\u4e2a\u5b57\u7b26\u7f16\u7801\uff0c\u7f16\u7801\u89c4\u5219\u5982\u4e0b\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>\u8f6c\u6362\u8868\u5982\u4e0b\uff1a<\/p>\n<table border=\"1\" width=\"766\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\"><strong>Unicode<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>UTF-8<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">0000 ~007F<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>0<\/strong>XXX XXXX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">0080 ~07FF<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>110<\/strong>X XXXX\u00a0<strong>10<\/strong>XX XXXX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">0800 ~FFFF<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>1110<\/strong>XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">1 0000 ~1F FFFF<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>1111 0<\/strong>XXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">20 0000 ~3FF FFFF<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>1111 10<\/strong>XX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"202\">\n<p align=\"center\">400 0000 ~7FFF FFFF<\/p>\n<\/td>\n<td valign=\"top\" width=\"562\">\n<p align=\"center\"><strong>1111 110<\/strong>X\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX\u00a0<strong>10<\/strong>XX XXXX<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6839\u636e\u4e0a\u9762\u7684\u8f6c\u6362\u8868\uff0c\u7406\u89e3UTF-8\u7684\u8f6c\u6362\u7f16\u7801\u89c4\u5219\u5c31\u53d8\u5f97\u975e\u5e38\u7b80\u5355\u4e86\uff1a\u7b2c\u4e00\u4e2a\u5b57\u8282\u7684\u7b2c\u4e00\u4f4d\u5982\u679c\u4e3a0\uff0c\u5219\u8868\u793a\u8fd9\u4e2a\u5b57\u8282\u5355\u72ec\u5c31\u662f\u4e00\u4e2a\u5b57\u7b26;\u5982\u679c\u4e3a1\uff0c\u8fde\u7eed\u591a\u5c11\u4e2a1\u5c31\u8868\u793a\u8be5\u5b57\u7b26\u5360\u6709\u591a\u5c11\u4e2a\u5b57\u8282\u3002<\/p>\n<p>\u4ee5\u6c49\u5b57\u201d\u4e25\u201d\u4e3a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u5b9e\u73b0UTF-8\u7f16\u7801<sup>[3]<\/sup>\u3002<\/p>\n<p>\u5df2\u77e5\u201d\u4e25\u201d\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\u201d\u4e25\u201d\u7684UTF-8\u7f16\u7801\u9700\u8981\u4e09\u4e2a\u5b57\u8282\uff0c\u5373\u683c\u5f0f\u662f\u201d1110xxxx 10xxxxxx 10xxxxxx\u201d\u3002\u7136\u540e\uff0c\u4ece\u201d\u4e25\u201d\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\u201d\u4e25\u201d\u7684UTF-8\u7f16\u7801\u662f\u201d11100100 10111000 10100101\u2033\uff0c\u8f6c\u6362\u6210\u5341\u516d\u8fdb\u5236\u5c31\u662fE4B8A5\u3002<\/p>\n<h3>Unicode\u4e0eUTF-8\u4e4b\u95f4\u7684\u8f6c\u6362<\/h3>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u4f8b\u5b50\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u201d\u4e25\u201d\u7684Unicode\u7801\u4e3a4E25\uff0cUTF-8\u7f16\u7801\u4e3aE4B8A5\uff0c\u4ed6\u4eec\u4e24\u8005\u662f\u4e0d\u4e00\u6837\u7684\uff0c\u9700\u8981\u901a\u8fc7\u7a0b\u5e8f\u7684\u8f6c\u6362\u6765\u5b9e\u73b0\uff0c\u5728Window\u5e73\u53f0\u6700\u7b80\u5355\u7684\u76f4\u89c2\u7684\u65b9\u6cd5\u5c31\u662f\u8bb0\u4e8b\u672c\u3002<\/p>\n<p><a class=\"external cboxElement\" title=\"2014122300001\" href=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826158757924.png\" rel=\"fancybox\" target=\"_blank\" rel=\"lightbox[19622] nofollow\"><img decoding=\"async\" loading=\"lazy\" title=\"2014122300001\" src=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826186874166.png\" alt=\"2014122300001\" width=\"689\" height=\"436\" border=\"0\" \/><\/a><\/p>\n<p>\u5728\u6700\u4e0b\u9762\u7684\u201d\u7f16\u7801\uff08E\uff09\u201d\u5904\u6709\u56db\u4e2a\u9009\u9879\uff1aANSI\u3001Unicode\u3001Unicode big endian\u3001UTF-8\u3002<\/p>\n<p>ANSI\uff1a\u8bb0\u4e8b\u672c\u7684\u9ed8\u8ba4\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u5bf9\u4e8e\u82f1\u6587\u6587\u4ef6\u662fASCII\u7f16\u7801\uff0c\u5bf9\u4e8e\u7b80\u4f53\u4e2d\u6587\u6587\u4ef6\u662fGB2312\u7f16\u7801\u3002\u6ce8\u610f\uff1a\u4e0d\u540c ANSI \u7f16\u7801\u4e4b\u95f4\u4e92\u4e0d\u517c\u5bb9\uff0c\u5f53\u4fe1\u606f\u5728\u56fd\u9645\u95f4\u4ea4\u6d41\u65f6\uff0c\u65e0\u6cd5\u5c06\u5c5e\u4e8e\u4e24\u79cd\u8bed\u8a00\u7684\u6587\u5b57\uff0c\u5b58\u50a8\u5728\u540c\u4e00\u6bb5 ANSI \u7f16\u7801\u7684\u6587\u672c\u4e2d<\/p>\n<p>Unicode\uff1aUCS-2\u7f16\u7801\u65b9\u5f0f\uff0c\u5373\u76f4\u63a5\u7528\u4e24\u4e2a\u5b57\u8282\u5b58\u5165\u5b57\u7b26\u7684Unicode\u7801\u3002\u8be5\u65b9\u5f0f\u662f\u201d\u5c0f\u5934\u201dlittle endian\u65b9\u5f0f\u3002<\/p>\n<p>Unicode big endian\uff1aUCS-2\u7f16\u7801\u65b9\u5f0f\uff0c\u201d\u5927\u5934\u201d\u65b9\u5f0f\u3002<\/p>\n<p>UTF-8\uff1a\u9605\u8bfb\u4e0a\u9762\uff08UTF-8\uff09\u3002<\/p>\n<p>&gt;&gt;&gt;\u5b9e\u4f8b\uff1a\u5728\u8bb0\u4e8b\u672c\u4e2d\u8f93\u5165\u201d\u4e25\u201d\u5b57\uff0c\u4f9d\u6b21\u9009\u62e9ANSI\u3001Unicode\u3001Unicode big endian\u3001UTF-8\u56db\u79cd\u7f16\u7801\u98ce\u683c\uff0c\u7136\u540e\u53e6\u5b58\u4e3a\uff0c\u4f7f\u7528EditPlus\u6587\u672c\u5de5\u5177\u4f7f\u7528\u201d16\u8fdb\u5236\u67e5\u770b\u5668\u201d\u8fdb\u884c\u67e5\u770b\uff0c\u5f97\u5230\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n<p><a class=\"external cboxElement\" title=\"1\" href=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826285623716.png\" rel=\"fancybox\" target=\"_blank\" rel=\"lightbox[19622] nofollow\"><img decoding=\"async\" loading=\"lazy\" title=\"1\" src=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826289847887.png\" alt=\"1\" width=\"562\" height=\"58\" border=\"0\" \/><\/a><\/p>\n<p><a class=\"external cboxElement\" title=\"2\" href=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826292502872.png\" rel=\"fancybox\" target=\"_blank\" rel=\"lightbox[19622] nofollow\"><img decoding=\"async\" loading=\"lazy\" title=\"2\" src=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826298435757.png\" alt=\"2\" width=\"580\" height=\"35\" border=\"0\" \/><\/a><\/p>\n<p><a class=\"external cboxElement\" title=\"3\" href=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826302962686.png\" rel=\"fancybox\" target=\"_blank\" rel=\"lightbox[19622] nofollow\"><img decoding=\"async\" loading=\"lazy\" title=\"3\" src=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826305934128.png\" alt=\"3\" width=\"532\" height=\"36\" border=\"0\" \/><\/a><\/p>\n<p><a class=\"external cboxElement\" title=\"4\" href=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826308286356.png\" rel=\"fancybox\" target=\"_blank\" rel=\"lightbox[19622] nofollow\"><img decoding=\"async\" loading=\"lazy\" title=\"4\" src=\"http:\/\/images.cnitblog.com\/blog\/381060\/201501\/060826312035541.png\" alt=\"4\" width=\"565\" height=\"46\" border=\"0\" \/><\/a><\/p>\n<p>ANSI\uff1a\u4e24\u4e2a\u5b57\u8282\u201dD1 CF\u201d\u6b63\u662f\u201d\u4e25\u201d\u7684GB2312\u7f16\u7801\u3002<\/p>\n<p>Unicode\uff1a\u56db\u4e2a\u5b57\u8282\u201dFF FE 25 4E\u201d\uff0c\u5176\u4e2d\u201dFF FE\u201d\u8868\u793a\u5c0f\u5934\u5b58\u50a8\u65b9\u5f0f\uff0c\u771f\u6b63\u7684\u7f16\u7801\u4e3a\u201d25 4E\u201d\u3002<\/p>\n<p>Unicode big endian\uff1a\u56db\u4e2a\u5b57\u8282\u201dFE FF 4E 25\u2033\uff0c\u201dFE FF\u201d\u8868\u793a\u5927\u5934\u5b58\u50a8\u65b9\u5f0f\uff0c\u771f\u6b63\u7f16\u7801\u4e3a\u201d4E 25\u2033\u3002<\/p>\n<p>UTF-8\uff1a\u7f16\u7801\u662f\u516d\u4e2a\u5b57\u8282\u201dEF BB BF E4 B8 A5\u2033\uff0c\u524d\u4e09\u4e2a\u5b57\u8282\u201dEF BB BF\u201d\u8868\u793a\u8fd9\u662fUTF-8\u7f16\u7801\uff0c\u540e\u4e09\u4e2a\u201dE4B8A5\u2033\u5c31\u662f\u201d\u4e25\u201d\u7684\u5177\u4f53\u7f16\u7801\uff0c\u5b83\u7684\u5b58\u50a8\u987a\u5e8f\u4e0e\u7f16\u7801\u987a\u5e8f\u662f\u4e00\u81f4\u7684\u3002<\/p>\n<h2>\u53c2\u8003\u6587\u732e&amp;\u66f4\u591a\u9605\u8bfb<\/h2>\n<p>1\u3001Unicode\u7ef4\u57fa\u767e\u79d1\uff1a<a class=\"external\" title=\"http:\/\/zh.wikipedia.org\/wiki\/Unicode\" href=\"http:\/\/zh.wikipedia.org\/wiki\/Unicode\" target=\"_blank\" rel=\"nofollow\">http:\/\/zh.wikipedia.org\/wiki\/Unicode<\/a><\/p>\n<p>2\u3001Unicode\u767e\u5ea6\u767e\u79d1\uff1a<a class=\"external\" title=\"http:\/\/baike.baidu.com\/view\/40801.htm\" href=\"http:\/\/baike.baidu.com\/view\/40801.htm\" target=\"_blank\" rel=\"nofollow\">http:\/\/baike.baidu.com\/view\/40801.htm<\/a><\/p>\n<p>3\u3001\u5b57\u7b26\u7f16\u7801\u7b14\u8bb0\uff1aASCII\uff0cUnicode\u548cUTF-8\uff1a<a class=\"external\" title=\"http:\/\/www.ruanyifeng.com\/blog\/2007\/10\/ascii_unicode_and_utf-8.html\" href=\"http:\/\/www.ruanyifeng.com\/blog\/2007\/10\/ascii_unicode_and_utf-8.html\" target=\"_blank\" rel=\"nofollow\">http:\/\/www.ruanyifeng.com\/blog\/2007\/10\/ascii_unicode_and_utf-8.html<\/a><\/p>\n<p>4\u3001UTF-8\u767e\u5ea6\u767e\u79d1\uff1a<a class=\"external\" title=\"http:\/\/baike.baidu.com\/view\/25412.htm\" href=\"http:\/\/baike.baidu.com\/view\/25412.htm\" target=\"_blank\" rel=\"nofollow\">http:\/\/baike.baidu.com\/view\/25412.htm<\/a><\/p>\n<h3>\u672c\u7cfb\u5217\uff1a<\/h3>\n<ul>\n<li><a href=\"http:\/\/www.importnew.com\/?p=19587\">java\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u4e4b\u9053\uff08\u4e00\uff09\u2014\u2013\u8ba4\u8bc6\u5b57\u7b26\u96c6<\/a><\/li>\n<li><a href=\"http:\/\/www.importnew.com\/?p=19606\">java\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u4e4b\u9053\uff08\u4e8c\uff09\u2014\u2013\u5b57\u7b26\u7f16\u7801\u8be6\u89e3\uff1a\u57fa\u7840\u77e5\u8bc6 + ASCII + GB**<\/a><\/li>\n<li><a href=\"http:\/\/www.importnew.com\/?p=19622\">java\u4e2d\u6587\u4e71\u7801\u89e3\u51b3\u4e4b\u9053\uff08\u4e09\uff09\u2014\u2013\u7f16\u7801\u8be6\u60c5\uff1a\u4f1f\u5927\u7684\u521b\u60f3\u2014Unicode\u7f16\u7801<\/a><\/li>\n<\/ul>\n<p>\u539f\u6587\u51fa\u5904\uff1a <a href=\"http:\/\/www.cnblogs.com\/chenssy\/p\/4205130.html\" target=\"_blank\">chenssy<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u968f\u7740\u8ba1\u7b97\u673a\u7684\u53d1\u5c55\u3001\u666e\u53ca\uff0c\u4e16\u754c\u5404\u56fd\u4e3a\u4e86\u9002\u5e94\u672c\u56fd\u7684\u8bed\u8a00\u548c\u5b57\u7b26\u90fd\u4f1a\u81ea\u5df1\u8bbe\u8ba1\u4e00\u5957\u81ea\u5df1\u7684\u7f16\u7801\u98ce\u683c\uff0c\u6b63\u662f\u7531\u4e8e\u8fd9\u79cd\u4e71\uff0c\u5bfc\u81f4\u5b58 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[63],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1570"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1570"}],"version-history":[{"count":1,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions"}],"predecessor-version":[{"id":1571,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1570\/revisions\/1571"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}