{"id":755,"date":"2014-11-21T15:08:53","date_gmt":"2014-11-21T07:08:53","guid":{"rendered":"http:\/\/ufqi.com\/blog\/?p=755"},"modified":"2014-11-21T15:08:53","modified_gmt":"2014-11-21T07:08:53","slug":"%e8%bd%ac%ef%bc%9a%e4%b8%ad%e6%96%87%e7%bc%96%e7%a0%81%e6%9d%82%e8%b0%88","status":"publish","type":"post","link":"https:\/\/ufqi.com\/blog\/%e8%bd%ac%ef%bc%9a%e4%b8%ad%e6%96%87%e7%bc%96%e7%a0%81%e6%9d%82%e8%b0%88\/","title":{"rendered":"\u8f6c\uff1a\u4e2d\u6587\u7f16\u7801\u6742\u8c08"},"content":{"rendered":"<h1><span style=\"font-size: 12px\">\u00a0<\/span><a style=\"font-size: 12px\" title=\"\u7531\u6842\u5357\u53d1\u5e03\" href=\"http:\/\/www.searchtb.com\/author\/%e6%a1%82%e5%8d%97\" rel=\"author\">\u6842\u5357<\/a><\/h1>\n<div><\/div>\n<div>\n<h1>\u7f16\u7801\u95ee\u9898\u7684\u4f8b\u5b50<\/h1>\n<p>\u5728windows\u81ea\u5e26\u7684notepad\uff08\u8bb0\u4e8b\u672c\uff09\u7a0b\u5e8f\u4e2d\u8f93\u5165\u201c\u8054\u901a\u201d\u4e24\u4e2a\u5b57\uff0c\u4fdd\u5b58\u540e\u518d\u6b21\u6253\u5f00\uff0c\u4f1a\u53d1\u73b0\u201c\u8054\u901a\u201d\u4e0d\u89c1\u4e86\uff0c\u4ee3\u4e4b\u4ee5\u201c\ufffd\ufffd\u0368\u201d\u7684\u4e71\u7801\u3002\u8fd9\u662fwindows\u5e73\u53f0\u4e0a\u5178\u578b\u7684\u4e2d\u6587\u7f16\u7801\u95ee\u9898\u3002\u5373\u6587\u4ef6\u4fdd\u5b58\u7684\u65f6\u5019\u662f\u6309\u7167ANSI\u7f16\u7801\uff08\u5176\u5b9e\u5c31\u662fGB2312\uff0c\u540e\u9762\u4f1a\u8be6\u7ec6\u4ecb\u7ecd\uff09\u4fdd\u5b58\uff0c\u6253\u5f00\u7684\u65f6\u5019\u7a0b\u5e8f\u6309\u7167UTF-8\u65b9\u5f0f\u5bf9\u5185\u5bb9\u89e3\u91ca\uff0c\u4e8e\u662f\u5c31\u51fa\u73b0\u4e86\u4e71\u7801\u3002\u907f\u514d\u4e71\u7801\u7684\u65b9\u5f0f\u5f88\u7b80\u5355\uff0c\u5728\u201c\u6587\u4ef6\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u6253\u5f00\u201d\u547d\u4ee4\uff0c\u9009\u62e9\u4fdd\u5b58\u7684\u6587\u4ef6\uff0c\u7136\u540e\u9009\u62e9\u201cANSI\u201d\u7f16\u7801\uff0c\u6b64\u65f6\u5c31\u80fd\u770b\u5230\u4e45\u8fdd\u7684\u201c\u8054\u901a\u201d\u4e24\u4e2a\u5b57\u4e86\u3002<\/p>\n<p>\u5728Linux\u5e73\u53f0\u4e0a\u5982\u679c\u4f7f\u7528cat\u7b49\u547d\u4ee4\u67e5\u770b\u6587\u4ef6\u4e2d\u7684\u4e2d\u6587\u5185\u5bb9\u65f6\uff0c\u53ef\u80fd\u51fa\u73b0\u4e71\u7801\u3002\u8fd9\u4e5f\u662f\u7f16\u7801\u7684\u95ee\u9898\u3002\u7b80\u5355\u7684\u8bf4\u662f\u6587\u4ef6\u65f6\u6309\u7167A\u7f16\u7801\u4fdd\u5b58\uff0c\u4f46\u662fcat\u547d\u4ee4\u6309\u7167\u5f53\u524dLocale\u8bbe\u5b9a\u7684B\u7f16\u7801\u53bb\u67e5\u770b\uff0c\u5728B\u548cA\u4e0d\u517c\u5bb9\u7684\u65f6\u5019\u5c31\u51fa\u73b0\u4e86\u4e71\u7801\u3002<\/p>\n<h1>\u4e3a\u4ec0\u4e48\u5199\u8fd9\u7bc7\u6587\u7ae0<\/h1>\n<p>\u4e2d\u6587\u7f16\u7801\u7531\u4e8e\u5386\u53f2\u539f\u56e0\u7275\u626f\u5230\u4e0d\u5c11\u6807\u51c6\uff0c\u5728\u4e0d\u4e86\u89e3\u7684\u65f6\u5019\u611f\u89c9\u4e00\u5934\u96fe\u6c34\uff1b\u4f46\u5176\u5b9e\u7406\u89e3\u7f16\u7801\u95ee\u9898\u5e76\u4e0d\u9700\u8981\u4f60\u6df1\u5165\u4e86\u89e3\u5404\u4e2a\u7f16\u7801\u6807\u51c6\uff0c\u53ea\u8981\u4f60\u660e\u767d\u4e86\u6765\u9f99\u53bb\u8109\uff0c\u4e86\u89e3\u4e86\u5173\u952e\u7684\u77e5\u8bc6\u70b9\uff0c\u5c31\u80fd\u5206\u6790\u548c\u89e3\u51b3\u65e5\u5e38\u5f00\u53d1\u5de5\u4f5c\u4e2d\u78b0\u5230\u7684\u5927\u90e8\u5206\u7f16\u7801\u95ee\u9898\u3002\u6709\u611f\u4e8e\u6211\u770b\u8fc7\u7684\u8d44\u6599\u548c\u6587\u7ae0\u8981\u4e48\u4e0d\u591f\u5168\u9762\uff0c\u8981\u4e48\u7565\u663e\u67af\u71e5\uff0c\u6240\u4ee5\u901a\u8fc7\u8fd9\u7bc7\u6587\u7ae0\u8bb0\u5f55\u4e0b\u7b14\u8005\u5728\u65e5\u5e38\u5de5\u4f5c\u4e2d\u78b0\u5230\u7684\u4e2d\u6587\u7f16\u7801\u539f\u7406\u76f8\u5173\u95ee\u9898\uff0c\u76ee\u7684\u4e3b\u8981\u662f\u81ea\u6211\u603b\u7ed3\uff0c\u5982\u679c\u80fd\u7ed9\u8bfb\u8005\u63d0\u4f9b\u4e00\u4e9b\u5e2e\u52a9\u90a3\u5c31\u7b97\u662f\u610f\u5916\u4e4b\u559c\u4e86\u3002\u7531\u4e8e\u4e25\u8c28\u7684\u7f16\u7801\u6807\u51c6\u5bf9\u6211\u6765\u8bf4\u662f\u65e0\u8da3\u7684\uff0c\u67af\u71e5\u7684\uff0c\u96be\u4ee5\u8bb0\u5fc6\u7684\uff0c\u672c\u6587\u5c1d\u8bd5\u7528\u6d45\u663e\u6613\u61c2\u7684\u751f\u6d3b\u8bed\u8a00\u89e3\u91ca\u4e2d\u6587\u7f16\u7801\u76f8\u5173\u7684\uff08\u4e5f\u53ef\u80fd\u4e0d\u76f8\u5173\u7684\uff09\u4e00\u4e9b\u95ee\u9898\uff0c\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u53d6\u540d\u6742\u8c08\u7684\u539f\u56e0\u3002\u672c\u6587\u80af\u5b9a\u5b58\u5728\u4e0d\u89c4\u8303\u4e0d\u5168\u9762\u7684\u5730\u65b9\uff0c\u6211\u4f1a\u5728\u53c2\u8003\u8d44\u6599\u91cc\u7ed9\u51fa\u5b98\u65b9\u6587\u6863\u7684\u94fe\u63a5\uff0c\u4e5f\u6b22\u8fce\u8bfb\u8005\u5728\u8bc4\u8bba\u4e2d\u63d0\u51fa\u66f4\u597d\u7684\u8868\u8fbe\u65b9\u5f0f&amp;\u6307\u51fa\u9519\u8bef\uff0c\u4e0d\u80dc\u611f\u6fc0\u3002<\/p>\n<p>\u5bf9\u7f16\u7801\u95ee\u9898\u7684\u7406\u89e3\u6211\u8ba4\u4e3a\u5206\u4e3a\u4e09\u4e2a\u5c42\u6b21\uff0c\u7b2c\u4e00\u4e2a\u5c42\u6b21\uff1a\u6982\u5ff5\uff0c\u77e5\u9053\u5404\u4e2a\u7f16\u7801\u6807\u51c6\u7684\u5e94\u7528\u573a\u666f\uff0c\u4e86\u89e3\u4e4b\u95f4\u7684\u5dee\u5f02\uff0c\u80fd\u5206\u6790\u548c\u89e3\u51b3\u5e38\u89c1\u7684\u4e00\u4e9b\u7f16\u7801\u95ee\u9898\u3002\u7b2c\u4e8c\u4e2a\u5c42\u6b21\uff1a\u6807\u51c6\uff0c\u638c\u63e1\u7f16\u7801\u7684\u7ec6\u8282\uff0c\u5982\u7f16\u7801\u8303\u56f4\uff0c\u7f16\u7801\u8f6c\u6362\u89c4\u5219\uff0c\u77e5\u9053\u8fd9\u4e9b\u5c31\u80fd\u81ea\u884c\u5f00\u53d1\u7f16\u7801\u8f6c\u6362\u5de5\u5177\u3002\u7b2c\u4e09\u4e2a\u5c42\u6b21\uff0c\u4f7f\u7528\uff0c\u4e86\u89e3\u4e2d\u6587\u7684\u7f16\u78012\u8fdb\u5236\u5b58\u50a8\uff0c\u5728\u7a0b\u5e8f\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u9009\u62e9\u5408\u7406\u7684\u7f16\u7801\u5e76\u5904\u7406\u4e2d\u6587\u3002\u4e3a\u4e86\u907f\u514d\u8ba9\u8bfb\u8005\u9677\u5165\u7f16\u7801\u6807\u51c6\u7684\u9ed1\u6d1e\u65e0\u6cd5\u8131\u8eab\uff08\u4e0d\u76f8\u4fe1\uff1f\u770b\u770bunicode\u7684\u89c4\u8303\u5c31\u660e\u767d\u6211\u7684\u610f\u601d\u4e86\uff09\uff0c\u540c\u65f6\u7531\u4e8e\u7f16\u7801\u67e5\u8be2&amp;\u8f6c\u6362\u5de5\u5177\u7b49\u90fd\u6709\u73b0\u6210\u5de5\u5177\u53ef\u4ee5\u4f7f\u7528\uff0c\u672c\u6587\u53ea\u6d89\u53ca\u7b2c\u4e00\u4e2a\u5c42\u6b21\uff0c\u4e0d\u6d89\u53ca\u7b2c\u4e8c\u5c42\u6b21\uff0c\u5728\u7b2c\u4e09\u5c42\u6b21\u4e0a\u4f1a\u505a\u4e00\u4e9b\u5c1d\u8bd5\u3002\u5728\u672c\u6587\u7684\u6700\u540e\u63d0\u4f9b\u4e86\u76f8\u5173\u94fe\u63a5\u4f9b\u5bf9\u6807\u51c6\u7ec6\u8282\u611f\u5174\u8da3\u7684\u540c\u5b66\u7ee7\u7eed\u5b66\u4e60\u3002\u6700\u540e\uff0c\u672c\u6587\u4e0d\u6d89\u53ca\u5177\u4f53\u8f6f\u4ef6\u7684\u4e71\u7801\u95ee\u9898\u89e3\u51b3\uff0c\u5982ssh\uff0cshell\uff0cvim\uff0cscreen\u7b49\uff0c\u8fd9\u4e9b\u8bdd\u9898\u7559\u7ed9\u5251\u8c6a\u540c\u5b66\u4e13\u6587\u9610\u8ff0\u3002<\/p>\n<h1>\u4e00\u5207\u90fd\u662f\u56e0\u4e3a\u7535\u8111\u4e0d\u8bc6\u5b57<\/h1>\n<p>\u7535\u8111\u5f88\u806a\u660e\uff0c\u53ef\u4ee5\u5e2e\u6211\u4eec\u505a\u5f88\u591a\u4e8b\u60c5\uff0c\u6700\u5f00\u59cb\u4e3b\u8981\u662f\u79d1\u5b66\u8ba1\u7b97\uff0c\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u7535\u8111\u522b\u540d\u8ba1\u7b97\u673a\u3002\u7535\u8111\u53c8\u5f88\u7b28\uff0c\u5728\u5979\u7684\u8111\u5b50\u91cc\u53ea\u6709\u6570\u5b57\uff0c\u5373\u6240\u6709\u7684\u6570\u636e\u5728\u5b58\u50a8\u548c\u8fd0\u7b97\u65f6\u90fd\u8981\u4f7f\u7528\u4e8c\u8fdb\u5236\u6570\u8868\u793a\u3002\u8fd9\u5728\u6700\u521d\u7535\u8111\u4e3b\u8981\u7528\u6765\u5904\u7406\u5927\u91cf\u590d\u6742\u7684\u79d1\u5b66\u8ba1\u7b97\u65f6\u4e0d\u662f\u4ec0\u4e48\u5927\u95ee\u9898\u4f46\u662f\u5f53\u7535\u8111\u9010\u6b65\u8d70\u5165\u666e\u901a\u4eba\u7684\u751f\u6d3b\u65f6\uff0c\u60c5\u51b5\u5f00\u59cb\u53d8\u906d\u4e86\u3002\u529e\u516c\u81ea\u52a8\u5316\u7b49\u9886\u57df\u6700\u4e3b\u8981\u7684\u9700\u6c42\u5c31\u662f\u6587\u5b57\u5904\u7406\uff0c\u7535\u8111\u5982\u4f55\u6765\u8868\u793a\u6587\u5b57\u5462\uff1f\u8fd9\u4e2a\u95ee\u9898\u5f53\u7136\u96be\u4e0d\u5012\u806a\u660e\u7684\u8ba1\u7b97\u673a\u79d1\u5b66\u5bb6\u4eec\uff0c\u7528\u6570\u5b57\u6765\u4ee3\u8868\u5b57\u7b26\u5457\u3002\u8fd9\u5c31\u662f\u201c\u7f16\u7801\u201d\u3002<\/p>\n<h1>\u82f1\u6587\u7684\u7ec8\u6781\u89e3\u51b3\u65b9\u6848\uff1aASCII<\/h1>\n<p>\u6bcf\u4e2a\u4eba\u90fd\u53ef\u4ee5\u7ea6\u5b9a\u81ea\u5df1\u7684\u4e00\u5957\u7f16\u7801\uff0c\u53ea\u8981\u4f7f\u7528\u65b9\u4e4b\u95f4\u4e86\u89e3\u5c31ok\u4e86\u3002\u6bd4\u5982\u8bf4\u54b1\u4fe9\u7ea6\u5b9a0\u00d710\u8868\u793aa\uff0c0\u00d711\u8868\u793ab\u3002\u5728\u4e00\u5f00\u59cb\u4e5f\u7684\u786e\u662f\u8fd9\u6837\u7684\uff0c\u51fa\u73b0\u4e86\u5404\u5f0f\u5404\u6837\u7684\u7f16\u7801\u3002\u8fd9\u6837\u6709\u4e24\u4e2a\u95ee\u9898\uff1a1.\u5404\u4e2a\u7f16\u7801\u7684\u5b57\u7b26\u96c6\u4e0d\u4e00\u6837\uff0c\u6709\u7684\u591a\uff0c\u6709\u7684\u5c11\u30022.\u76f8\u540c\u5b57\u7b26\u7684\u7f16\u7801\u4e5f\u4e0d\u4e00\u6837\u3002\u4f60\u8fd9\u91cca\u662f0\u00d710.\u4ed6\u90a3\u91cca\u53ef\u80fd\u662f0\u00d730\u3002\u4e8e\u662f\u4f60\u4fdd\u5b58\u7684\u6587\u4ef6\u4ed6\u5c31\u4e0d\u80fd\u76f4\u63a5\u7528\uff0c\u5fc5\u987b\u8981\u8f6c\u6362\u7f16\u7801\u3002\u968f\u7740\u6c9f\u901a\u8303\u56f4\u7684\u6269\u5927\uff0c\u91c7\u7528\u4e0d\u540c\u7f16\u7801\u7684\u4eba\u4eec\u4e92\u76f8\u901a\u4fe1\u5c31\u4e71\u5957\u4e86\uff0c\u8fd9\u5c31\u662f\u6211\u4eec\u5e38\u8bf4\u7684\uff1a\u9e21\u540c\u9e2d\u8bb2\u3002\u5982\u679c\u8981\u907f\u514d\u8fd9\u79cd\u6df7\u4e71\uff0c\u90a3\u4e48\u5927\u5bb6\u5c31\u5fc5\u987b\u4f7f\u7528\u76f8\u540c\u7684\u7f16\u7801\u89c4\u5219\uff0c\u4e8e\u662f\u7f8e\u56fd\u6709\u5173\u7684\u6807\u51c6\u5316\u7ec4\u7ec7\u5c31\u51fa\u53f0\u4e86ASCII\uff08<strong>American Standard Code for Information Interchange<\/strong><strong>\uff09<\/strong>\u7f16\u7801\uff0c\u7edf\u4e00\u89c4\u5b9a\u4e86\u82f1\u6587\u5e38\u7528\u7b26\u53f7\u7528\u54ea\u4e9b\u4e8c\u8fdb\u5236\u6570\u6765\u8868\u793a\u3002ASCII\u662f\u6807\u51c6\u7684\u5355\u5b57\u8282\u5b57\u7b26\u7f16\u7801\u65b9\u6848\uff0c\u7528\u4e8e\u57fa\u4e8e\u6587\u672c\u7684\u6570\u636e\u3002<\/p>\n<p>ASCII\u6700\u521d\u662f\u7f8e\u56fd\u56fd\u5bb6\u6807\u51c6\uff0c\u4f9b\u4e0d\u540c\u8ba1\u7b97\u673a\u5728\u76f8\u4e92\u901a\u4fe1\u65f6\u7528\u4f5c\u5171\u540c\u9075\u5b88\u7684\u897f\u6587\u5b57\u7b26\u7f16\u7801\u6807\u51c6\uff0c\u5df2\u88ab\u56fd\u9645\u6807\u51c6\u5316\u7ec4\u7ec7\uff08International Organization for Standardization, ISO\uff09\u5b9a\u4e3a\u56fd\u9645\u6807\u51c6\uff0c\u79f0\u4e3aISO 646\u6807\u51c6\u3002\u9002\u7528\u4e8e\u6240\u6709\u62c9\u4e01\u6587\u5b57\u5b57\u6bcd\u3002ASCII \u7801\u4f7f\u7528\u6307\u5b9a\u76847 \u4f4d\u62168 \u4f4d\u4e8c\u8fdb\u5236\u6570\u7ec4\u5408\u6765\u8868\u793a128 \u6216256 \u79cd\u53ef\u80fd\u7684\u5b57\u7b26\u3002\u6807\u51c6ASCII \u7801\u4e5f\u53eb\u57fa\u7840ASCII\u7801\uff0c\u4f7f\u75287 \u4f4d\u4e8c\u8fdb\u5236\u6570\u6765\u8868\u793a\u6240\u6709\u7684\u5927\u5199\u548c\u5c0f\u5199\u5b57\u6bcd\uff0c\u6570\u5b570 \u52309\u3001\u6807\u70b9\u7b26\u53f7\uff0c \u4ee5\u53ca\u5728\u7f8e\u5f0f\u82f1\u8bed\u4e2d\u4f7f\u7528\u7684\u7279\u6b8a\u63a7\u5236\u5b57\u7b26\u3002\u800c\u6700\u9ad8\u4f4d\u4e3a1\u7684\u53e6128\u4e2a\u5b57\u7b26\uff0880H\u2014FFH\uff09\u88ab\u79f0\u4e3a\u201c\u6269\u5c55ASCII\u201d\uff0c\u4e00\u822c\u7528\u6765\u5b58\u653e\u82f1\u6587\u7684\u5236\u8868\u7b26\u3001\u90e8\u5206\u97f3\u6807\u5b57\u7b26\u7b49\u7b49\u7684\u4e00\u4e9b\u5176\u5b83\u7b26\u53f7\u3002<\/p>\n<p>\u5176\u4e2d\uff1a<strong>0<\/strong><strong>\uff5e<\/strong><strong>31<\/strong><strong>\u53ca<\/strong><strong>127(<\/strong><strong>\u5171<\/strong><strong>33<\/strong><strong>\u4e2a<\/strong><strong>)<\/strong><strong>\u662f\u63a7\u5236\u5b57\u7b26\u6216\u901a\u4fe1\u4e13\u7528\u5b57\u7b26\uff08\u5176\u4f59\u4e3a\u53ef\u663e\u793a\u5b57\u7b26\uff09\uff0c<\/strong>32\uff5e126(\u517195\u4e2a)\u662f\u5b57\u7b26(32\u662f\u7a7a\u683c\uff09\uff0c\u5176\u4e2d48\uff5e57\u4e3a0\u52309\u5341\u4e2a\u963f\u62c9\u4f2f\u6570\u5b57\uff0c65\uff5e90\u4e3a26\u4e2a\u5927\u5199\u82f1\u6587\u5b57\u6bcd\uff0c97\uff5e122\u53f7\u4e3a26\u4e2a\u5c0f\u5199\u82f1\u6587\u5b57\u6bcd\uff0c\u5176\u4f59\u4e3a\u4e00\u4e9b\u6807\u70b9\u7b26\u53f7\u3001\u8fd0\u7b97\u7b26\u53f7\u7b49\u3002<\/p>\n<p><a href=\"http:\/\/www.searchtb.com\/wp-content\/uploads\/2012\/04\/ascii0.jpg\"><img alt=\"ascii \u7f16\u7801\u8868\" src=\"http:\/\/www.searchtb.com\/wp-content\/uploads\/2012\/04\/ascii0.jpg\" \/><\/a><\/p>\n<p>\u73b0\u5728\u6240\u6709\u4f7f\u7528\u82f1\u6587\u7684\u7535\u8111\u7ec8\u4e8e\u53ef\u4ee5\u7528\u540c\u4e00\u79cd\u7f16\u7801\u6765\u4ea4\u6d41\u4e86\u3002\u7406\u89e3\u4e86ASCII\u7f16\u7801\uff0c\u5176\u4ed6\u5b57\u6bcd\u578b\u7684\u8bed\u8a00\u7f16\u7801\u65b9\u6848\u5c31\u89e6\u7c7b\u65c1\u901a\u4e86\u3002<\/p>\n<h1>\u4e00\u6ce2\u4e09\u6298\u7684\u4e2d\u6587\u7f16\u7801<\/h1>\n<h2>\u7b2c\u4e00\u6b21\u5c1d\u8bd5\uff1aGB2312<\/h2>\n<p>ASCII\u8fd9\u79cd\u5b57\u7b26\u7f16\u7801\u89c4\u5219\u663e\u7136\u7528\u6765\u5904\u7406\u82f1\u6587\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u5b83\u7684\u51fa\u73b0\u6781\u5927\u7684\u4fc3\u8fdb\u4e86\u4fe1\u606f\u5728\u897f\u65b9\u5c24\u5176\u662f\u7f8e\u56fd\u7684\u4f20\u64ad\u548c\u4ea4\u6d41\u3002\u4f46\u662f\u5bf9\u4e8e\u4e2d\u6587\uff0c\u5e38\u7528\u6c49\u5b57\u5c31\u67096000\u4ee5\u4e0a\uff0cASCII \u5355\u5b57\u8282\u7f16\u7801\u663e\u7136\u662f\u4e0d\u591f\u7528\u3002\u4e3a\u4e86\u7c89\u788e\u7f8e\u5e1d\u56fd\u4e3b\u4e49\u901a\u8fc7\u7f16\u7801\u9650\u5236\u4e2d\u56fd\u4eba\u6c11\u4f7f\u7528\u7535\u8111\u7684\u65e0\u803b\u9634\u8c0b\uff0c\u4e2d\u56fd\u56fd\u5bb6\u6807\u51c6\u603b\u5c40\u53d1\u5e03\u4e86GB2312\u7801\u5373\u4e2d\u534e\u4eba\u6c11\u5171\u548c\u56fd\u56fd\u5bb6\u6c49\u5b57\u4fe1\u606f\u4ea4\u6362\u7528\u7f16\u7801\uff0c\u5168\u79f0\u300a\u4fe1\u606f\u4ea4\u6362\u7528\u6c49\u5b57\u7f16\u7801\u5b57\u7b26\u96c6\u2014\u2014\u57fa\u672c\u96c6\u300b\uff0c1981\u5e745\u67081\u65e5\u5b9e\u65bd\uff0c\u901a\u884c\u4e8e\u5927\u9646\u3002GB2312\u5b57\u7b26\u96c6\u4e2d\u9664\u5e38\u7528\u7b80\u4f53\u6c49\u5b57\u5b57\u7b26\u5916\u8fd8\u5305\u62ec\u5e0c\u814a\u5b57\u6bcd\u3001\u65e5\u6587\u5e73\u5047\u540d\u53ca\u7247\u5047\u540d\u5b57\u6bcd\u3001\u4fc4\u8bed\u897f\u91cc\u5c14\u5b57\u6bcd\u7b49\u5b57\u7b26\uff0c\u672a\u6536\u5f55\u7e41\u4f53\u4e2d\u6587\u6c49\u5b57\u548c\u4e00\u4e9b\u751f\u50fb\u5b57\u3002\u00a0EUC-CN\u53ef\u4ee5\u7406\u89e3\u4e3aGB2312\u7684\u522b\u540d\uff0c\u548cGB2312\u5b8c\u5168\u76f8\u540c\u3002<\/p>\n<p>GB2312\u662f\u57fa\u4e8e\u533a\u4f4d\u7801\u8bbe\u8ba1\u7684\uff0c\u5728\u533a\u4f4d\u7801\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u4e0a\u5206\u522b\u52a0\u4e0aA0H\u5c31\u5f97\u5230\u4e86GB2312\u7f16\u7801\u3002\u8fd9\u91cc\u7b2c\u4e00\u6b21\u63d0\u5230\u4e86\u201c\u533a\u4f4d\u7801\u201d\uff0c\u6211\u5c31\u8fde\u5e26\u628a\u4e0b\u9762\u8fd9\u51e0\u4e2a\u8ba9\u4eba\u6478\u4e0d\u5230\u5934\u8111\u7684XX\u7801\u4e00\u9505\u7aef\u4e86\u5427\uff1a<\/p>\n<p><strong>\u533a\u4f4d\u7801\uff0c\u56fd\u6807\u7801\uff0c\u4ea4\u6362\u7801\uff0c\u5185\u7801\uff0c\u5916\u7801<\/strong><strong><\/strong><\/p>\n<p><strong>\u533a\u4f4d\u7801<\/strong>\uff1a\u5c31\u662f\u628a\u4e2d\u6587\u5e38\u7528\u7684\u7b26\u53f7\uff0c\u6570\u5b57\uff0c\u6c49\u5b57\u7b49\u5206\u95e8\u522b\u7c7b\u8fdb\u884c\u7f16\u7801\u3002\u533a\u4f4d\u7801\u628a\u7f16\u7801\u8868\u5206\u4e3a94\u4e2a\u533a\uff0c\u6bcf\u4e2a\u533a\u5bf9\u5e9494\u4e2a\u4f4d\uff0c\u6bcf\u4e2a\u4f4d\u7f6e\u5c31\u653e\u4e00\u4e2a\u5b57\u7b26\uff08\u6c49\u5b57\uff0c\u7b26\u53f7\uff0c\u6570\u5b57\u90fd\u5c5e\u4e8e\u5b57\u7b26\uff09\u3002\u8fd9\u6837\u6bcf\u4e2a\u5b57\u7b26\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u7ec4\u5408\u8d77\u6765\u5c31\u6210\u4e3a\u8be5\u6c49\u5b57\u7684\u533a\u4f4d\u7801\u3002\u533a\u4f4d\u7801\u4e00\u822c\u752810\u8fdb\u5236\u6570\u6765\u8868\u793a\uff0c\u59824907\u5c31\u8868\u793a49\u533a7\u4f4d\uff0c\u5bf9\u5e94\u7684\u5b57\u7b26\u662f\u201c\u5b66\u201d\u3002\u533a\u4f4d\u7801\u4e2d01-09\u533a\u662f\u7b26\u53f7\u3001\u6570\u5b57\u533a\uff0c16-87\u533a\u662f\u6c49\u5b57\u533a\uff0c10-15\u548c88-94\u662f\u672a\u5b9a\u4e49\u7684\u7a7a\u767d\u533a\u3002\u5b83\u5c06\u6536\u5f55\u7684\u6c49\u5b57\u5206\u6210\u4e24\u7ea7\uff1a\u7b2c\u4e00\u7ea7\u662f\u5e38\u7528\u6c49\u5b57\u8ba13755\u4e2a\uff0c\u7f6e\u4e8e16-55\u533a\uff0c\u6309\u6c49\u8bed\u62fc\u97f3\u5b57\u6bcd\/\u7b14\u5f62\u987a\u5e8f\u6392\u5217\uff1b\u7b2c\u4e8c\u7ea7\u6c49\u5b57\u662f\u6b21\u5e38\u7528\u6c49\u5b57\u8ba13008\u4e2a\uff0c\u7f6e\u4e8e56-87\u533a\uff0c\u6309\u90e8\u9996\/\u7b14\u753b\u987a\u5e8f\u6392\u5217\u3002\u5728\u7f51\u4e0a\u641c\u7d22\u201c\u533a\u4f4d\u7801\u67e5\u8be2\u7cfb\u7edf\u201d\u53ef\u4ee5\u5f88\u65b9\u4fbf\u7684\u627e\u5230\u6c49\u5b57\u548c\u5bf9\u5e94\u533a\u4f4d\u7801\u8f6c\u6362\u7684\u5de5\u5177\u3002\u4e3a\u4e86\u907f\u514d\u5e7f\u544a\u5acc\u7591\u548c\u6b7b\u94fe\uff0c\u8fd9\u91cc\u5c31\u4e0d\u4e3e\u4f8b\u4e86\u3002<\/p>\n<p><strong>\u56fd\u6807\u7801<\/strong>\uff1a\u00a0\u533a\u4f4d\u7801\u65e0\u6cd5\u7528\u4e8e\u6c49\u5b57\u901a\u4fe1\uff0c\u56e0\u4e3a\u5b83\u53ef\u80fd\u4e0e\u901a\u4fe1\u4f7f\u7528\u7684\u63a7\u5236\u7801\uff0800H~1FH\uff09\uff08\u53730~31\uff0c\u8fd8\u8bb0\u5f97ASCII\u7801\u7279\u6b8a\u5b57\u7b26\u7684\u8303\u56f4\u5417\uff1f\uff09\u53d1\u751f\u51b2\u7a81\u3002\u4e8e\u662fISO2022\u89c4\u5b9a\u6bcf\u4e2a\u6c49\u5b57\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u5fc5\u987b\u5206\u522b\u52a0\u4e0a32\uff08\u5373\u4e8c\u8fdb\u5236\u657000100000\uff0c16\u8fdb\u523620H\uff09\uff0c\u5f97\u5230\u5bf9\u5e94\u7684\u56fd\u6807\u4ea4\u6362\u7801\uff0c\u7b80\u79f0<strong>\u56fd\u6807\u7801\uff0c\u4ea4\u6362\u7801<\/strong>\uff0c\u56e0\u6b64\uff0c\u201c\u5b66\u201d\u5b57\u7684\u56fd\u6807\u4ea4\u6362\u7801\u8ba1\u7b97\u4e3a\uff1a<\/p>\n<div>\n<div id=\"highlighter_538875\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<\/td>\n<td>\n<div>\n<div><code>\u00a0\u00a0<\/code><code>00110001 00000111<\/code><\/div>\n<div><code>+ 00100000 00100000<\/code><\/div>\n<div><code>\u00a0<\/code><code>-------------------<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>01010001 00100111<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u7528\u5341\u516d\u8fdb\u5236\u6570\u8868\u793a\u5373\u4e3a5127H\u3002<\/p>\n<p><strong>\u4ea4\u6362\u7801<\/strong>\uff1a\u5373\u56fd\u6807\u4ea4\u6362\u7801\u7684\u7b80\u79f0\uff0c\u7b49\u540c\u4e0a\u9762\u8bf4\u7684\u56fd\u6807\u7801\u3002<\/p>\n<p><strong>\u5185\u7801<\/strong>\uff1a\u7531\u4e8e\u6587\u672c\u4e2d\u901a\u5e38\u6df7\u5408\u4f7f\u7528\u6c49\u5b57\u548c\u897f\u6587\u5b57\u7b26\uff0c\u6c49\u5b57\u4fe1\u606f\u5982\u679c\u4e0d\u4e88\u4ee5\u7279\u522b\u6807\u8bc6\uff0c\u5c31\u4f1a\u4e0e\u5355\u5b57\u8282\u7684ASCII\u7801\u6df7\u6dc6\u3002\u6b64\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6cd5\u4e4b\u4e00\u662f\u5c06\u4e00\u4e2a\u6c49\u5b57\u770b\u6210\u662f\u4e24\u4e2a\u6269\u5c55ASCII\u7801\uff0c\u4f7f\u8868\u793aGB2312\u6c49\u5b57\u7684\u4e24\u4e2a\u5b57\u8282\u7684\u6700\u9ad8\u4f4d\u90fd\u4e3a1\u3002\u5373\u56fd\u6807\u7801\u52a0\u4e0a128\uff08\u5373\u4e8c\u8fdb\u5236\u657010000000,16\u8fdb\u523680H\uff09\u8fd9\u79cd\u9ad8\u4f4d\u4e3a1\u7684\u53cc\u5b57\u8282\u6c49\u5b57\u7f16\u7801\u5373\u4e3aGB2312\u6c49\u5b57\u7684\u673a\u5185\u7801\uff0c\u7b80\u79f0\u4e3a\u5185\u7801\u300220H+80H=A0H\u3002\u8fd9\u4e5f\u5c31\u662f\u5e38\u8bf4\u7684\u5728\u533a\u4f4d\u7801\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u4e0a\u5206\u522b\u52a0\u4e0aA0H\u5c31\u5f97\u5230\u4e86GB2312\u7f16\u7801\u7684\u7531\u6765\u3002<\/p>\n<div>\n<div id=\"highlighter_905326\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<\/td>\n<td>\n<div>\n<div><code>\u00a0\u00a0<\/code><code>00110001\u00a000000111<\/code><\/div>\n<div><code>+ 10100000 10100000<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code><code>-------------------<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code><code>11010001\u00a010100111<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u7528\u5341\u516d\u8fdb\u5236\u6570\u8868\u793a\u5373\u4e3aD1A7H\u3002<\/p>\n<p><strong>\u5916\u7801<\/strong>\uff1a\u673a\u5916\u7801\u7684\u7b80\u79f0,\u5c31\u662f\u6c49\u5b57\u8f93\u5165\u7801\uff0c\u662f\u4e3a\u4e86\u901a\u8fc7\u952e\u76d8\u5b57\u7b26\u628a\u6c49\u5b57\u8f93\u5165\u8ba1\u7b97\u673a\u800c\u8bbe\u8ba1\u7684\u4e00\u79cd\u7f16\u7801\u3002 \u82f1\u6587\u8f93\u5165\u65f6\uff0c\u76f8\u8f93\u5165\u4ec0\u4e48\u5b57\u7b26\u4fbf\u6309\u4ec0\u4e48\u952e\uff0c\u5916\u7801\u548c\u5185\u7801\u4e00\u81f4\u3002\u6c49\u5b57\u8f93\u5165\u65f6\uff0c\u53ef\u80fd\u8981\u6309\u51e0\u4e2a\u952e\u624d\u80fd\u8f93\u5165\u4e00\u4e2a\u6c49\u5b57\u3002 \u6c49\u5b57\u8f93\u5165\u65b9\u6848\u6709\u6210\u767e\u4e0a\u5343\u4e2a\uff0c\u4f46\u662f\u8fd9\u5343\u5dee\u4e07\u522b\u7684\u5916\u7801\u8f93\u5165\u8fdb\u8ba1\u7b97\u673a\u540e\u90fd\u4f1a\u8f6c\u6362\u6210\u7edf\u4e00\u7684\u5185\u7801\u3002<\/p>\n<p>\u6700\u540e\u603b\u7ed3\u4e00\u4e0b\u4e0a\u9762\u7684\u6982\u5ff5\u3002\u4e2d\u56fd\u56fd\u5bb6\u6807\u51c6\u603b\u5c40\u628a\u4e2d\u6587\u5e38\u7528\u5b57\u7b26\u7f16\u7801\u4e3a94\u4e2a\u533a\uff0c\u6bcf\u4e2a\u533a\u5bf9\u5e9494\u4e2a\u4f4d\uff0c\u6bcf\u4e2a\u5b57\u7b26\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u7ec4\u5408\u8d77\u6765\u5c31\u662f\u8be5\u5b57\u7b26\u7684<strong>\u533a\u4f4d\u7801<\/strong>, \u533a\u4f4d\u7801\u752810\u8fdb\u5236\u6570\u6765\u8868\u793a\uff0c\u59824907\u5c31\u8868\u793a49\u533a7\u4f4d\uff0c\u5bf9\u5e94\u7684\u5b57\u7b26\u662f\u201c\u5b66\u201d\u3002 \u7531\u4e8e\u533a\u4f4d\u7801\u7684\u53d6\u503c\u8303\u56f4\u4e0e\u901a\u4fe1\u4f7f\u7528\u7684\u63a7\u5236\u7801\uff0800H~1FH\uff09\uff08\u53730~31\uff09\u53d1\u751f\u51b2\u7a81\u3002\u6bcf\u4e2a\u6c49\u5b57\u7684\u533a\u53f7\u548c\u4f4d\u53f7\u5206\u522b\u52a0\u4e0a32\uff08\u537316\u8fdb\u523620H\uff09\u5f97\u5230<strong>\u56fd\u6807\u7801\uff0c\u4ea4\u6362\u7801\u3002<\/strong>\u201c\u5b66\u201d\u7684\u56fd\u6807\u7801\u4e3a5127H\u3002\u7531\u4e8e\u6587\u672c\u4e2d\u901a\u5e38\u6df7\u5408\u4f7f\u7528\u6c49\u5b57\u548c\u897f\u6587\u5b57\u7b26\uff0c\u4e3a\u4e86\u8ba9\u6c49\u5b57\u4fe1\u606f\u4e0d\u4f1a\u4e0e\u5355\u5b57\u8282\u7684ASCII\u7801\u6df7\u6dc6\uff0c\u5c06\u4e00\u4e2a\u6c49\u5b57\u770b\u6210\u662f\u4e24\u4e2a\u6269\u5c55ASCII\u7801\uff0c\u5373\u6c49\u5b57\u7684\u4e24\u4e2a\u5b57\u8282\u7684\u6700\u9ad8\u4f4d\u7f6e\u4e3a1\uff0c\u5f97\u5230\u7684\u7f16\u7801\u4e3aGB2312\u6c49\u5b57\u7684<strong>\u5185\u7801<\/strong>\u3002\u201c\u5b66\u201d\u7684\u5185\u7801\u4e3aD1A7H\u3002\u65e0\u8bba\u4f60\u4f7f\u7528\u4ec0\u4e48\u8f93\u5165\u6cd5\uff0c\u901a\u8fc7\u4ec0\u4e48\u6837\u7684\u6309\u952e\u7ec4\u5408\u628a\u201c\u5b66\u201d\u8f93\u5165\u8ba1\u7b97\u673a\uff0c\u201c\u5b66\u201d\u5728\u4f7f\u7528GB2312\uff08\u4ee5\u53ca\u517c\u5bb9GB2312\uff09\u7f16\u7801\u7684\u8ba1\u7b97\u673a\u91cc\u7684\u5185\u7801\u90fd\u662fD1A7H\u3002<\/p>\n<h2>\u7b2c\u4e8c\u6b21\u5c1d\u8bd5\uff1aGBK<\/h2>\n<p>GB2312\u7684\u51fa\u73b0\u57fa\u672c\u6ee1\u8db3\u4e86\u6c49\u5b57\u7684\u8ba1\u7b97\u673a\u5904\u7406\u9700\u8981\uff0c\u4f46\u7531\u4e8e\u4e0a\u9762\u63d0\u5230\u672a\u6536\u5f55\u7e41\u4f53\u5b57\u548c\u751f\u50fb\u5b57\uff0c\u4ece\u800c\u4e0d\u80fd\u5904\u7406\u4eba\u540d\u3001\u53e4\u6c49\u8bed\u7b49\u65b9\u9762\u51fa\u73b0\u7684\u7f55\u7528\u5b57\uff0c\u8fd9\u5bfc\u81f4\u4e861995\u5e74\u300a\u6c49\u5b57\u7f16\u7801\u6269\u5c55\u89c4\u8303\u300b\uff08GBK\uff09\u7684\u51fa\u73b0\u3002GBK\u7f16\u7801\u662fGB2312\u7f16\u7801\u7684\u8d85\u96c6\uff0c\u5411\u4e0b\u5b8c\u5168\u517c\u5bb9GB2312\uff0c\u517c\u5bb9\u7684\u542b\u4e49\u662f\u4e0d\u4ec5\u5b57\u7b26\u517c\u5bb9\uff0c\u800c\u4e14\u76f8\u540c\u5b57\u7b26\u7684\u7f16\u7801\u4e5f\u76f8\u540c\uff0c\u540c\u65f6\u5728\u5b57\u6c47\u4e00\u7ea7\u652f\u6301ISO\/IEC10646\u20141\u548cGB 13000\u20141\u7684\u5168\u90e8\u4e2d\u3001\u65e5\u3001\u97e9\uff08CJK\uff09\u6c49\u5b57\uff0c\u5171\u8ba120902\u5b57\u3002GBK\u8fd8\u6536\u5f55\u4e86GB2312\u4e0d\u5305\u542b\u7684\u6c49\u5b57\u90e8\u9996\u7b26\u53f7\u3001\u7ad6\u6392\u6807\u70b9\u7b26\u53f7\u7b49\u5b57\u7b26\u3002CP936\u548cGBK\u7684\u6709\u4e9b\u8bb8\u5dee\u522b\uff0c\u7edd\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u53ef\u4ee5\u628aCP936\u5f53\u4f5cGBK\u7684\u522b\u540d\u3002<\/p>\n<h2>\u7b2c\u4e09\u6b21\u5c1d\u8bd5\uff1aGB18030<\/h2>\n<p>GB18030\u7f16\u7801\u5411\u4e0b\u517c\u5bb9GBK\u548cGB2312\u3002GB18030\u6536\u5f55\u4e86\u6240\u6709Unicode3.1\u4e2d\u7684\u5b57\u7b26\uff0c\u5305\u62ec\u4e2d\u56fd\u5c11\u6570\u6c11\u65cf\u5b57\u7b26\uff0cGBK\u4e0d\u652f\u6301\u7684\u97e9\u6587\u5b57\u7b26\u7b49\u7b49\uff0c\u4e5f\u53ef\u4ee5\u8bf4\u662f\u4e16\u754c\u5927\u591a\u6c11\u65cf\u7684\u6587\u5b57\u7b26\u53f7\u90fd\u88ab\u6536\u5f55\u5728\u5185\u3002GBK\u548cGB2312\u90fd\u662f\u53cc\u5b57\u8282\u7b49\u5bbd\u7f16\u7801\uff0c\u5982\u679c\u7b97\u4e0a\u548cASCII\u517c\u5bb9\u6240\u652f\u6301\u7684\u5355\u5b57\u8282\uff0c\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u662f\u5355\u5b57\u8282\u548c\u53cc\u5b57\u8282\u6df7\u5408\u7684\u53d8\u957f\u7f16\u7801\u3002GB18030\u7f16\u7801\u662f\u53d8\u957f\u7f16\u7801\uff0c\u6709\u5355\u5b57\u8282\u3001\u53cc\u5b57\u8282\u548c\u56db\u5b57\u8282\u4e09\u79cd\u65b9\u5f0f\u3002<\/p>\n<p>\u5176\u5b9e\uff0c\u8fd9\u4e09\u4e2a\u6807\u51c6\u5e76\u4e0d\u9700\u8981\u6b7b\u8bb0\u786c\u80cc\uff0c\u53ea\u9700\u8981\u4e86\u89e3\u662f\u6839\u636e\u5e94\u7528\u9700\u6c42\u4e0d\u65ad\u6269\u5c55\u7f16\u7801\u8303\u56f4\u5373\u53ef\u3002\u4eceGB2312\u5230GBK\u518d\u5230GB18030\u6536\u5f55\u7684\u5b57\u7b26\u8d8a\u6765\u8d8a\u591a\u5373\u53ef\u3002\u4e07\u5e78\u7684\u662f\u4e00\u76f4\u662f\u5411\u4e0b\u517c\u5bb9\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u4e00\u4e2a\u6c49\u5b57\u5728\u8fd9\u4e09\u4e2a\u7f16\u7801\u6807\u51c6\u91cc\u7684\u7f16\u7801\u662f\u4e00\u6a21\u4e00\u6837\u7684\u3002\u8fd9\u4e9b\u7f16\u7801\u7684\u5171\u6027\u662f\u53d8\u957f\u7f16\u7801\uff0c\u5355\u5b57\u8282ASCII\u517c\u5bb9\uff0c\u5bf9\u5176\u4ed6\u5b57\u7b26GB2312\u548cGBK\u90fd\u4f7f\u7528\u53cc\u5b57\u8282\u7b49\u5bbd\u7f16\u7801\uff0c\u53ea\u6709GB18030\u8fd8\u6709\u56db\u5b57\u8282\u7f16\u7801\u7684\u65b9\u5f0f\u3002\u8fd9\u4e9b\u7f16\u7801\u6700\u5927\u7684\u95ee\u9898\u662f2\u4e2a\u30021.\u7531\u4e8e\u4f4e\u5b57\u8282\u7684\u7f16\u7801\u8303\u56f4\u548cASCII\u6709\u91cd\u5408\uff0c\u6240\u4ee5\u4e0d\u80fd\u6839\u636e\u4e00\u4e2a\u5b57\u8282\u7684\u5185\u5bb9\u5224\u65ad\u662f\u4e2d\u6587\u7684\u4e00\u90e8\u5206\u8fd8\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u82f1\u6587\u5b57\u7b26\u30022.\u5982\u679c\u6709\u4e24\u4e2a\u6c49\u5b57\u7f16\u7801\u4e3aA1A2B1B2\uff0c\u5b58\u5728A2B1\u4e5f\u662f\u4e00\u4e2a\u6709\u6548\u6c49\u5b57\u7f16\u7801\u7684\u7279\u6b8a\u60c5\u51b5\u3002\u8fd9\u6837\u5c31\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\u6807\u51c6\u7684\u5b57\u7b26\u4e32\u5339\u914d\u51fd\u6570\u6765\u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u4e32\u91cc\u662f\u5426\u5305\u542b\u67d0\u4e00\u4e2a\u6c49\u5b57\uff0c\u800c\u9700\u8981\u5148\u5224\u65ad\u5b57\u7b26\u8fb9\u754c\u7136\u540e\u624d\u80fd\u8fdb\u884c\u5b57\u7b26\u5339\u914d\u5224\u65ad\u3002<\/p>\n<p>\u6700\u540e\uff0c\u63d0\u4e00\u4e2a\u5c0f\u63d2\u66f2\uff0c\u4e0a\u9762\u8bb2\u7684\u90fd\u662f\u5927\u9646\u63a8\u884c\u7684\u6c49\u5b57\u7f16\u7801\u6807\u51c6\uff0c\u4f7f\u7528\u7e41\u4f53\u7684\u4e2d\u6587\u793e\u7fa4\u4e2d\u6700\u5e38\u7528\u7684\u7535\u8111<a href=\"http:\/\/baike.baidu.com\/view\/1712.htm\" target=\"_blank\">\u6c49\u5b57<\/a><a href=\"http:\/\/baike.baidu.com\/view\/51987.htm\" target=\"_blank\">\u5b57\u7b26\u96c6<\/a>\u6807\u51c6\u53eb\u5927\u4e94\u7801\uff08Big5\uff09\uff0c\u5171\u6536\u5f5513,060\u4e2a\u4e2d\u6587\u5b57\uff0c\u5176\u4e2d\u6709\u4e8c\u5b57\u4e3a\u91cd\u8986\u7f16\u7801(\u5b9e\u5728\u662f\u4e0d\u5e94\u8be5)\u3002Big5\u867d\u666e\u53ca\u4e8e\u4e2d\u56fd\u7684\u53f0\u6e7e\u3001\u9999\u6e2f\u4e0e\u6fb3\u95e8\u7b49\u7e41\u4f53\u4e2d\u6587\u901a\u884c\u533a\uff0c\u4f46\u957f\u671f\u4ee5\u6765\u5e76\u975e\u5f53\u5730\u7684\u56fd\u5bb6\u6807\u51c6\uff0c\u800c\u53ea\u662f\u4e1a\u754c\u6807\u51c6\u3002\u501a\u5929\u4e2d\u6587\u7cfb\u7edf\u3001Windows\u7b49\u4e3b\u8981\u7cfb\u7edf\u7684\u5b57\u7b26\u96c6\u90fd\u662f\u4ee5Big5\u4e3a\u57fa\u51c6\uff0c\u4f46\u5382\u5546\u53c8\u5404\u81ea\u589e\u5220\uff0c\u884d\u751f\u6210\u591a\u79cd\u4e0d\u540c\u7248\u672c\u30022003\u5e74\uff0cBig5\u88ab\u6536\u5f55\u5230\u53f0\u6e7e\u5b98\u65b9\u6807\u51c6\u7684\u9644\u5f55\u5f53\u4e2d\uff0c\u53d6\u5f97\u4e86\u8f83\u6b63\u5f0f\u7684\u5730\u4f4d\u3002\u8fd9\u4e2a\u6700\u65b0\u7248\u672c\u88ab\u79f0\u4e3aBig5-2003\u3002<\/p>\n<h1>\u5929\u4e0b\u5f52\u4e00Unicode<\/h1>\n<p>\u770b\u4e86\u4e0a\u9762\u7684\u591a\u4e2a\u4e2d\u6587\u7f16\u7801\u662f\u4e0d\u662f\u6709\u70b9\u5934\u6655\u4e86\u5462\uff1f\u5982\u679c\u628a\u8fd9\u4e2a\u95ee\u9898\u653e\u5230\u5168\u4e16\u754cn\u591a\u4e2a\u56fd\u5bb6n\u591a\u8bed\u79cd\u5462\uff1f\u5404\u56fd\u548c\u5404\u5730\u533a\u81ea\u5df1\u7684\u6587\u5b57\u7f16\u7801\u89c4\u5219\u4e92\u76f8\u51b2\u7a81\u7684\u60c5\u51b5\u5168\u7403\u4fe1\u606f<a href=\"http:\/\/www.edenw.com\/tech\/net\/switch\/\" target=\"_blank\">\u4ea4\u6362<\/a>\u5e26\u6765\u4e86\u5f88\u5927\u7684\u9ebb\u70e6\u3002<\/p>\n<p>\u8981\u771f\u6b63\u5f7b\u5e95\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4e0a\u9762\u4ecb\u7ecd\u7684\u90a3\u4e9b\u901a\u8fc7\u6269\u5c55ASCII\u4fee\u4fee\u8865\u8865\u7684\u65b9\u5f0f\u5df2\u7ecf\u8d70\u4e0d\u901a\u4e86\uff0c\u800c\u5fc5\u987b\u6709\u4e00\u4e2a\u5168\u65b0\u7684\u7f16\u7801\u7cfb\u7edf\uff0c\u8fd9\u4e2a\u7cfb\u7edf\u8981\u53ef\u4ee5\u5c06\u4e2d\u6587\u3001\u65e5\u6587\u3001\u6cd5\u6587\u3001\u5fb7\u6587\u2026\u2026\u7b49\u7b49\u6240\u6709\u7684\u6587\u5b57\u7edf\u4e00\u8d77\u6765\u8003\u8651\uff0c\u4e3a\u6bcf\u4e00\u4e2a\u6587\u5b57\u90fd\u5206\u914d\u4e00\u4e2a\u5355\u72ec\u7684\u7f16\u7801\u3002\u4e8e\u662f\uff0cUnicode\u8bde\u751f\u4e86\u3002Unicode\uff08\u7edf\u4e00\u7801\u3001\u4e07\u56fd\u7801\u3001\u5355\u4e00\u7801\uff09\u4e3a\u5730\u7403\u4e0a\uff08\u4ee5\u540e\u4f1a\u5305\u62ec\u706b\u661f\uff0c\u91d1\u661f\uff0c\u55b5\u661f\u7b49\uff09\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\u5728Unicode\u91cc\uff0c\u6240\u6709\u7684\u5b57\u7b26\u88ab\u4e00\u89c6\u540c\u4ec1\uff0c\u6c49\u5b57\u4e0d\u518d\u4f7f\u7528\u201c\u4e24\u4e2a\u6269\u5c55ASCII\u201d\uff0c\u800c\u662f\u4f7f\u7528\u201c1\u4e2aUnicode\u201d\u6765\u8868\u793a\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6240\u6709\u7684\u6587\u5b57\u90fd\u6309\u4e00\u4e2a\u5b57\u7b26\u6765\u5904\u7406\uff0c\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684Unicode\u7801\u3002Unicode\u7528\u6570\u5b570-0x10FFFF\u6765\u6620\u5c04\u8fd9\u4e9b\u5b57\u7b26\uff0c\u6700\u591a\u53ef\u4ee5\u5bb9\u7eb31114112\u4e2a\u5b57\u7b26\uff0c\u6216\u8005\u8bf4\u67091114112\u4e2a\u7801\u4f4d\uff08\u7801\u4f4d\u5c31\u662f\u53ef\u4ee5\u5206\u914d\u7ed9\u5b57\u7b26\u7684\u6570\u5b57\uff09\u3002<\/p>\n<p>\u63d0\u5230Unicode\u4e0d\u80fd\u4e0d\u63d0UCS\uff08\u901a\u7528\u5b57\u7b26\u96c6Universal Character Set\uff09\u3002UCS\u662f\u7531ISO\u5236\u5b9a\u7684ISO 10646\uff08\u6216\u79f0ISO\/IEC 10646\uff09\u6807\u51c6\u6240\u5b9a\u4e49\u7684\u6807\u51c6\u5b57\u7b26\u96c6\u3002UCS-2\u7528\u4e24\u4e2a\u5b57\u8282\u7f16\u7801\uff0cUCS-4\u75284\u4e2a\u5b57\u8282\u7f16\u7801\u3002Unicode\u662f\u7531unicode.org\u5236\u5b9a\u7684\u7f16\u7801\u673a\u5236\uff0cISO\u4e0eunicode.org\u662f\u4e24\u4e2a\u4e0d\u540c\u7684\u7ec4\u7ec7, \u867d\u7136\u6700\u521d\u5236\u5b9a\u4e86\u4e0d\u540c\u7684\u6807\u51c6; \u4f46\u76ee\u6807\u662f\u4e00\u81f4\u7684\u3002\u6240\u4ee5\u81ea\u4eceunicode2.0\u5f00\u59cb, unicode\u91c7\u7528\u4e86\u4e0eISO 10646-1\u76f8\u540c\u7684\u5b57\u5e93\u548c\u5b57\u7801, ISO\u4e5f\u627f\u8bfaISO10646\u5c06\u4e0d\u4f1a\u7ed9\u8d85\u51fa0x10FFFF\u7684UCS-4\u7f16\u7801\u8d4b\u503c, \u4f7f\u5f97\u4e24\u8005\u4fdd\u6301\u4e00\u81f4\u3002\u5927\u5bb6\u7b80\u5355\u8ba4\u4e3aUCS\u7b49\u540c\u4e8eUnicode\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u5728Unicode\u4e2d\uff1a\u6c49\u5b57\u201c\u5b57\u201d\u5bf9\u5e94\u7684\u6570\u5b57\u662f23383\u3002\u5728Unicode\u4e2d\uff0c\u6211\u4eec\u6709\u5f88\u591a\u65b9\u5f0f\u5c06\u6570\u5b5723383\u8868\u793a\u6210\u7a0b\u5e8f\u4e2d\u7684\u6570\u636e\uff0c\u5305\u62ec\uff1aUTF-8\u3001UTF-16\u3001UTF-32\u3002UTF\u662f\u201cUCS Transformation Format\u201d\u7684\u7f29\u5199\uff0c\u53ef\u4ee5\u7ffb\u8bd1\u6210Unicode\u5b57\u7b26\u96c6\u8f6c\u6362\u683c\u5f0f\uff0c\u5373\u600e\u6837\u5c06Unicode\u5b9a\u4e49\u7684\u6570\u5b57\u8f6c\u6362\u6210\u7a0b\u5e8f\u6570\u636e\u3002\u4f8b\u5982\uff0c\u201c\u6c49\u5b57\u201d\u5bf9\u5e94\u7684\u6570\u5b57\u662f0x6c49\u548c0x5b57\uff0c\u800c\u7f16\u7801\u7684\u7a0b\u5e8f\u6570\u636e\u662f\uff1a<\/p>\n<div>\n<div id=\"highlighter_48248\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<\/td>\n<td>\n<div>\n<div><code>BYTE data_utf8[] = {0xE6, 0xB1, 0x89, 0xE5, 0xAD, 0x97}; \/\/ UTF-8\u7f16\u7801<\/code><\/div>\n<div><code>WORD data_utf16[] = {0x6c49, 0x5b57}; \/\/ UTF-16\u7f16\u7801<\/code><\/div>\n<div><code>DWORD data_utf32[] = {0x6c49, 0x5b57}; \/\/ UTF-32\u7f16\u7801<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u8fd9\u91cc\u7528BYTE\u3001WORD\u3001DWORD\u5206\u522b\u8868\u793a\u65e0\u7b26\u53f78\u4f4d\u6574\u6570\uff0c\u65e0\u7b26\u53f716\u4f4d\u6574\u6570\u548c\u65e0\u7b26\u53f732\u4f4d\u6574\u6570\u3002UTF-8\u3001UTF-16\u3001UTF-32\u5206\u522b\u4ee5BYTE\u3001WORD\u3001DWORD\u4f5c\u4e3a\u7f16\u7801\u5355\u4f4d\u3002\u201c\u6c49\u5b57\u201d\u7684UTF-8\u7f16\u7801\u9700\u89816\u4e2a\u5b57\u8282\u3002\u201c\u6c49\u5b57\u201d\u7684UTF-16\u7f16\u7801\u9700\u8981\u4e24\u4e2aWORD\uff0c\u5927\u5c0f\u662f4\u4e2a\u5b57\u8282\u3002\u201c\u6c49\u5b57\u201d\u7684UTF-32\u7f16\u7801\u9700\u8981\u4e24\u4e2aDWORD\uff0c\u5927\u5c0f\u662f8\u4e2a\u5b57\u8282\u3002\u6839\u636e\u5b57\u8282\u5e8f\u7684\u4e0d\u540c\uff0cUTF-16\u53ef\u4ee5\u88ab\u5b9e\u73b0\u4e3aUTF-16LE\u6216UTF-16BE\uff0cUTF-32\u53ef\u4ee5\u88ab\u5b9e\u73b0\u4e3aUTF-32LE\u6216UTF-32BE\u3002<\/p>\n<p>\u4e0b\u9762\u4ecb\u7ecdUTF-8\u3001UTF-16\u3001UTF-32\u3001BOM\u3002<\/p>\n<p><strong><em>UTF-8<\/em><\/strong><\/p>\n<p>UTF-8\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u5bf9Unicode\u8fdb\u884c\u7f16\u7801\u3002\u4eceUnicode\u5230UTF-8\u7684\u7f16\u7801\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Unicode\u7f16\u7801(16\u8fdb\u5236)<\/td>\n<td>UTF-8 \u5b57\u8282\u6d41(\u4e8c\u8fdb\u5236)<\/td>\n<\/tr>\n<tr>\n<td>000000 \u2013 00007F<\/td>\n<td>0xxxxxxx<\/td>\n<\/tr>\n<tr>\n<td>000080 \u2013 0007FF<\/td>\n<td>110xxxxx 10xxxxxx<\/td>\n<\/tr>\n<tr>\n<td>000800 \u2013 00FFFF<\/td>\n<td>1110xxxx 10xxxxxx 10xxxxxx<\/td>\n<\/tr>\n<tr>\n<td>010000 \u2013 10FFFF<\/td>\n<td>11110xxx 10xxxxxx 10xxxxxx 10xxxxxx<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>UTF-8\u7684\u7279\u70b9\u662f\u5bf9\u4e0d\u540c\u8303\u56f4\u7684\u5b57\u7b26\u4f7f\u7528\u4e0d\u540c\u957f\u5ea6\u7684\u7f16\u7801\u3002\u5bf9\u4e8e0\u00d700-0x7F\u4e4b\u95f4\u7684\u5b57\u7b26\uff0cUTF-8\u7f16\u7801\u4e0eASCII\u7f16\u7801\u5b8c\u5168\u76f8\u540c\u3002UTF-8\u7f16\u7801\u7684\u6700\u5927\u957f\u5ea6\u662f4\u4e2a\u5b57\u8282\u3002\u4ece\u4e0a\u8868\u53ef\u4ee5\u770b\u51fa\uff0c4\u5b57\u8282\u6a21\u677f\u670921\u4e2ax\uff0c\u5373\u53ef\u4ee5\u5bb9\u7eb321\u4f4d\u4e8c\u8fdb\u5236\u6570\u5b57\u3002Unicode\u7684\u6700\u5927\u7801\u4f4d0x10FFFF\u4e5f\u53ea\u670921\u4f4d\u3002\u603b\u7ed3\u4e86\u4e00\u4e0b\u89c4\u5f8b\uff1aUTF-8\u7684\u7b2c\u4e00\u4e2a\u5b57\u8282\u5f00\u59cb\u76841\u7684\u4e2a\u6570\u4ee3\u8868\u4e86\u603b\u7684\u7f16\u7801\u5b57\u8282\u6570\uff0c\u540e\u7eed\u5b57\u8282\u90fd\u662f\u4ee510\u5f00\u59cb\u3002\u7531\u4e0a\u9762\u7684\u89c4\u5219\u53ef\u4ee5\u6e05\u6670\u7684\u770b\u51faUTF-8\u7f16\u7801\u514b\u670d\u4e86\u4e2d\u6587\u7f16\u7801\u7684\u4e24\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u4f8b1\uff1a\u201c\u6c49\u201d\u5b57\u7684Unicode\u7f16\u7801\u662f0x6C49\u30020x6C49\u57280\u00d70800-0xFFFF\u4e4b\u95f4\uff0c\u4f7f\u75283\u5b57\u8282\u6a21\u677f\u4e86\uff1a1110xxxx 10xxxxxx 10xxxxxx\u3002\u5c060x6C49\u5199\u6210\u4e8c\u8fdb\u5236\u662f\uff1a0110 1100 0100 1001\uff0c \u7528\u8fd9\u4e2a\u6bd4\u7279\u6d41\u4f9d\u6b21\u4ee3\u66ff\u6a21\u677f\u4e2d\u7684x\uff0c\u5f97\u5230\uff1a11100110 10110001 10001001\uff0c\u5373E6 B1 89\u3002<\/p>\n<p>\u4f8b2\uff1aUnicode\u7f16\u78010x20C30\u57280\u00d7010000-0x10FFFF\u4e4b\u95f4\uff0c\u4f7f\u7528\u75284\u5b57\u8282\u6a21\u677f\u4e86\uff1a11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\u3002\u5c060x20C30\u5199\u621021\u4f4d\u4e8c\u8fdb\u5236\u6570\u5b57\uff08\u4e0d\u8db321\u4f4d\u5c31\u5728\u524d\u9762\u88650\uff09\uff1a0 0010 0000 1100 0011 0000\uff0c\u7528\u8fd9\u4e2a\u6bd4\u7279\u6d41\u4f9d\u6b21\u4ee3\u66ff\u6a21\u677f\u4e2d\u7684x\uff0c\u5f97\u5230\uff1a11110000 10100000 10110000 10110000\uff0c\u5373F0 A0 B0 B0\u3002<\/p>\n<p><strong><em>UTF-16<\/em><\/strong><\/p>\n<p>UTF-16\u7f16\u7801\u4ee516\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u4e3a\u5355\u4f4d\u3002\u6211\u4eec\u628aUnicode\u7f16\u7801\u8bb0\u4f5cU\u3002\u7f16\u7801\u89c4\u5219\u5982\u4e0b\uff1a\u3000\u3000\u5982\u679cU&lt;0\u00d710000\uff0cU\u7684UTF-16\u7f16\u7801\u5c31\u662fU\u5bf9\u5e94\u768416\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\uff08\u4e3a\u4e66\u5199\u7b80\u4fbf\uff0c\u4e0b\u6587\u5c0616\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u8bb0\u4f5cWORD\uff09\u3002\u4e2d\u6587\u8303\u56f4 4E00-9FBF\uff0c\u6240\u4ee5\u5728UTF-16\u7f16\u7801\u91cc\u4e2d\u65872\u4e2a\u5b57\u8282\u7f16\u7801\u3002\u5982\u679cU\u22650\u00d710000\uff0c\u6211\u4eec\u5148\u8ba1\u7b97U\u2019=U-0\u00d710000\uff0c\u7136\u540e\u5c06U\u2019\u5199\u6210\u4e8c\u8fdb\u5236\u5f62\u5f0f\uff1ayyyy yyyy yyxx xxxx xxxx\uff0cU\u7684UTF-16\u7f16\u7801\uff08\u4e8c\u8fdb\u5236\uff09\u5c31\u662f\uff1a110110yyyyyyyyyy 110111xxxxxxxxxx\u3002<\/p>\n<p><strong><em>UTF-32<\/em><\/strong><\/p>\n<p>UTF-32\u7f16\u7801\u4ee532\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u4e3a\u5355\u4f4d\u3002Unicode\u7684UTF-32\u7f16\u7801\u5c31\u662f\u5176\u5bf9\u5e94\u768432\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u3002<\/p>\n<p><strong><em>\u5b57\u8282\u5e8f<\/em><\/strong><\/p>\n<p>\u6839\u636e\u5b57\u8282\u5e8f(\u5bf9\u5b57\u8282\u5e8f\u4e0d\u592a\u4e86\u89e3\u7684\u540c\u5b66\u8bf7\u53c2\u8003<a href=\"http:\/\/en.wikipedia.org\/wiki\/Endianness\">http:\/\/en.wikipedia.org\/wiki\/Endianness<\/a>)\u7684\u4e0d\u540c\uff0cUTF-16\u53ef\u4ee5\u88ab\u5b9e\u73b0\u4e3aUTF-16LE\uff08Little Endian\uff09\u6216UTF-16BE\uff08Big Endian\uff09\uff0cUTF-32\u53ef\u4ee5\u88ab\u5b9e\u73b0\u4e3aUTF-32LE\u6216UTF-32BE\u3002\u4f8b\u5982\uff1a<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Unicode\u7f16\u7801<\/td>\n<td>UTF-16LE<\/td>\n<td>UTF-16BE<\/td>\n<td>UTF-32LE<\/td>\n<td>UTF-32BE<\/td>\n<\/tr>\n<tr>\n<td>0x006C49<\/td>\n<td>49 6C<\/td>\n<td>6C 49<\/td>\n<td>49 6C 00 00<\/td>\n<td>00 00 6C 49<\/td>\n<\/tr>\n<tr>\n<td>0x020C30<\/td>\n<td>43 D8 30 DC<\/td>\n<td>D8 43 DC 30<\/td>\n<td>30 0C 02 00<\/td>\n<td>00 02 0C 30<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u90a3\u4e48\uff0c\u600e\u4e48\u5224\u65ad\u5b57\u8282\u6d41\u7684\u5b57\u8282\u5e8f\u5462\uff1fUnicode\u6807\u51c6\u5efa\u8bae\u7528BOM\uff08Byte Order Mark\uff09\u6765\u533a\u5206\u5b57\u8282\u5e8f\uff0c\u5373\u5728\u4f20\u8f93\u5b57\u8282\u6d41\u524d\uff0c\u5148\u4f20\u8f93\u88ab\u4f5c\u4e3aBOM\u7684\u5b57\u7b26\u201d\u96f6\u5bbd\u65e0\u4e2d\u65ad\u7a7a\u683c\u201d\u3002\u8fd9\u4e2a\u5b57\u7b26\u7684\u7f16\u7801\u662fFEFF\uff0c\u800c\u53cd\u8fc7\u6765\u7684FFFE\uff08UTF-16\uff09\u548cFFFE0000\uff08UTF-32\uff09\u5728Unicode\u4e2d\u90fd\u662f\u672a\u5b9a\u4e49\u7684\u7801\u4f4d\uff0c\u4e0d\u5e94\u8be5\u51fa\u73b0\u5728\u5b9e\u9645\u4f20\u8f93\u4e2d\u3002\u4e0b\u8868\u662f\u5404\u79cdUTF\u7f16\u7801\u7684BOM\uff1a<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>UTF\u7f16\u7801<\/td>\n<td>Byte Order Mark<\/td>\n<\/tr>\n<tr>\n<td>UTF-8<\/td>\n<td>EF BB BF<\/td>\n<\/tr>\n<tr>\n<td>UTF-16LE<\/td>\n<td>FF FE<\/td>\n<\/tr>\n<tr>\n<td>UTF-16BE<\/td>\n<td>FE FF<\/td>\n<\/tr>\n<tr>\n<td>UTF-32LE<\/td>\n<td>FF FE 00 00<\/td>\n<\/tr>\n<tr>\n<td>UTF-32BE<\/td>\n<td>00 00 FE FF<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u603b\u7ed3\u4e00\u4e0b\uff0cISO\u4e0eunicode.org\u90fd\u654f\u9510\u7684\u610f\u8bc6\u5230\u53ea\u6709\u4e3a\u4e16\u754c\u4e0a\u6bcf\u79cd\u8bed\u8a00\u4e2d\u7684\u6bcf\u4e2a\u5b57\u7b26\u8bbe\u5b9a\u7edf\u4e00\u5e76\u4e14\u552f\u4e00\u7684\u4e8c\u8fdb\u5236\u7f16\u7801\u624d\u80fd\u5f7b\u5e95\u89e3\u51b3\u8ba1\u7b97\u673a\u4e16\u754c\u4fe1\u606f\u4ea4\u6d41\u4e2d\u7f16\u7801\u51b2\u7a81\u7684\u95ee\u9898\u3002\u7531\u6b64\u8bde\u751f\u4e86UCS\u548cunicode\uff0c\u800c\u8fd9\u4e24\u4e2a\u89c4\u8303\u662f\u4e00\u81f4\u7684\u3002\u5728Unicode\u91cc\uff0c\u6240\u6709\u7684\u5b57\u7b26\u88ab\u4e00\u89c6\u540c\u4ec1\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u6240\u6709\u7684\u6587\u5b57\u90fd\u6309\u4e00\u4e2a\u5b57\u7b26\u6765\u5904\u7406\uff0c\u5b83\u4eec\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684Unicode\u7801\u3002UTF-8\u3001UTF-16\u3001UTF-32\u5206\u522b\u5b9a\u4e49\u4e86\u600e\u6837\u5c06Unicode\u5b9a\u4e49\u7684\u6570\u5b57\u8f6c\u6362\u6210\u7a0b\u5e8f\u6570\u636e\u3002UTF-8\u4ee5\u5b57\u8282\u4e3a\u5355\u4f4d\u5bf9Unicode\u8fdb\u884c\u7f16\u7801\uff0c\u4e00\u4e2a\u82f1\u6587\u5b57\u7b26\u53601\u4e2a\u5b57\u8282\uff0c\u6c49\u5b57\u53603\u4e2a\u5b57\u8282\uff1bUTF-16\u4ee516\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u4e3a\u5355\u4f4d\u5bf9Unicode\u8fdb\u884c\u7f16\u7801\uff0c\u4e2d\u6587\u82f1\u6587\u90fd\u53602\u4e2a\u5b57\u8282\uff1bUTF-32\u4ee532\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u4e3a\u5355\u4f4d\u5bf9Unicode\u8fdb\u884c\u7f16\u7801\uff0c\u4e2d\u6587\u82f1\u6587\u90fd\u53604\u4e2a\u5b57\u8282\u3002\u53ef\u4ee5\u5728<a href=\"http:\/\/www.unicode.org\/charts\/unihan.html\">http:\/\/www.unicode.org\/charts\/unihan.html<\/a>\u00a0\u67e5\u770b\u6c49\u5b57\u7684unicode\u7801\u4ee5\u53caUTF-8\u3001UTF-16\u3001UTF-32\u7f16\u7801\u3002<\/p>\n<h1>\u4e2d\u6587\u4e8c\u8fdb\u5236\u5b58\u50a8<\/h1>\n<p>\u4ecb\u7ecd\u4e86\u8fd9\u4e48\u591a\u7684\u7f16\u7801\u77e5\u8bc6\uff0c\u771f\u6b63\u7684\u6587\u4ef6\u5185\u5bb9\u662f\u4ec0\u4e48\u6837\u5b50\u7684\u5462\uff1f\u4e0b\u9762\u6211\u4eec\u5c31\u901a\u8fc7\u5b9e\u9a8c\u770b\u770b\u5728\u7b14\u8005Linux\u673a\u5668\u4e0a \u201c\u4e2d\u6587\u201d\u8fd9\u4e24\u4e2a\u5b57\u5728\u4e0d\u540c\u7684\u7f16\u7801\u4e0b\u4fdd\u5b58\u7684\u6587\u4ef6\u5185\u5bb9\u3002\u4e0b\u9762\u662f\u6211\u7684\u5b9e\u9a8c\u8fc7\u7a0b\uff0c\u6709\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u673a\u5668\u4e0a\u91cd\u505a\u4e00\u4e0b\u3002window\u5e73\u53f0\u4e0a\u7684\u60c5\u51b5\u7c7b\u4f3c\u8fd9\u91cc\u5c31\u4e0d\u8d58\u8ff0\u4e86\u3002<\/p>\n<p>\u5b9e\u9a8c\u9700\u8981\u9700\u8981\u4f7f\u75282\u4e2a\u5de5\u5177\uff1a<\/p>\n<ol>\n<li>od \u67e5\u770b\u6587\u4ef6\u5185\u5bb9\uff1a<a href=\"http:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/od-invocation.html\">http:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/od-invocation.html<\/a><\/li>\n<li>iconv \u7f16\u7801\u8f6c\u6362\u5de5\u5177\uff1ahttp:\/\/www.gnu.org\/software\/libiconv\/<\/li>\n<\/ol>\n<table width=\"636\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"75\">\u6c49\u5b57<\/td>\n<td valign=\"top\" width=\"90\">Unicode\uff08ucs-2\uff0910\u8fdb\u5236\u8868\u793a<\/td>\n<td valign=\"top\" width=\"75\">Utf-8<\/td>\n<td valign=\"top\" width=\"75\">Utf-16<\/td>\n<td valign=\"top\" width=\"75\">Utf32<\/td>\n<td valign=\"top\" width=\"75\">\u533a\u4f4d\u7801<\/td>\n<td valign=\"top\" width=\"90\">GB2312\/GBK\/GB18030<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\u4e2d<\/td>\n<td valign=\"top\" width=\"90\">20013<\/td>\n<td valign=\"top\" width=\"75\">E4 B8 AD<\/td>\n<td valign=\"top\" width=\"75\">4E2D<\/td>\n<td valign=\"top\" width=\"75\">00004E2D<\/td>\n<td valign=\"top\" width=\"75\">5448<\/td>\n<td valign=\"top\" width=\"90\">D6D0<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"75\">\u6587<\/td>\n<td valign=\"top\" width=\"90\">25991<\/td>\n<td valign=\"top\" width=\"75\">E6 96 87<\/td>\n<td valign=\"top\" width=\"75\">6587<\/td>\n<td valign=\"top\" width=\"75\">00006587<\/td>\n<td valign=\"top\" width=\"75\">4636<\/td>\n<td valign=\"top\" width=\"90\">CEC4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u673a\u5668\u73af\u5883\uff1a<br \/>\nos: Red Hat Enterprise Linux AS release 4<br \/>\nCpu: Intel(R) Xeon(R) CPU<br \/>\nlocale\uff1aLC_ALL=zh_CN.utf-8<\/p>\n<div>\n<div id=\"highlighter_614627\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<div>19<\/div>\n<div>20<\/div>\n<div>21<\/div>\n<div>22<\/div>\n<div>23<\/div>\n<div>24<\/div>\n<div>25<\/div>\n<div>26<\/div>\n<div>27<\/div>\n<div>28<\/div>\n<div>29<\/div>\n<div>30<\/div>\n<div>31<\/div>\n<div>32<\/div>\n<div>33<\/div>\n<div>34<\/div>\n<div>35<\/div>\n<div>36<\/div>\n<div>37<\/div>\n<\/td>\n<td>\n<div>\n<div><code>\/\/\u751f\u6210utf8\u7f16\u7801\u4e0b\u7684\u6587\u4ef6<\/code><\/div>\n<div><code>echo \u2013n \"\u4e2d\u6587\" &gt; foo.utf8<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u68c0\u67e5foo\u7684\u5185\u5bb9\uff1a<\/code><\/div>\n<div><code>od -t x1 foo.utf8<\/code><\/div>\n<div><code>0000000 e4 b8 ad e6 96 87<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u8f6c\u6362\u4e3autf16\u7f16\u7801<\/code><\/div>\n<div><code>iconv -f utf-8 -t utf-16 foo.utf8 &gt; foo.utf16<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u67e5\u770bfoo.utf16\u5185\u5bb9<\/code><\/div>\n<div><code>od -t x1 foo.utf16<\/code><\/div>\n<div><code>0000000 ff fe 2d 4e 87 65<\/code><\/div>\n<div><code>Ff fe\u662fBOM\uff08\u8fd8\u8bb0\u5f97\u5417\uff1f\u901a\u8fc7BOM\u6765\u5b57\u8282\u6d41\u7684\u5b57\u8282\u5e8f\uff09\uff0c\u5176\u4f59\u90e8\u5206\u7684\u786e\u662fUTF-16LE\u7f16\u7801\u7684\u5185\u5bb9<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u8f6c\u6362\u4e3autf32\u7f16\u7801<\/code><\/div>\n<div><code>iconv -f utf-16 -t utf-32 foo.utf16 &gt; foo.utf32<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u67e5\u770bfoo.utf32\u5185\u5bb9<\/code><\/div>\n<div><code>od -t x1 foo.utf32<\/code><\/div>\n<div><code>0000000 ff fe 00 00 2d 4e 00 00 87 65 00 00<\/code><\/div>\n<div><code>Ff fe\u662fBOM\uff0c\u7684\u786e\u662fUTF-32LE\u7f16\u7801\u7684\u5185\u5bb9<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u8f6c\u6362\u4e3agb2312\u7f16\u7801<\/code><\/div>\n<div><code>iconv -f utf-8 -t gb2312 foo.txt &gt; foo.gb2312<\/code><\/div>\n<div><code>od -t x1 foo.gb2312<\/code><\/div>\n<div><code>0000000 d6 d0 ce c4<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u8f6c\u6362\u4e3aGBK\u7f16\u7801<\/code><\/div>\n<div><code>iconv -f utf-8 -t gbk foo.txt &gt; foo.gbk<\/code><\/div>\n<div><code>od -t x1 foo.gbk<\/code><\/div>\n<div><code>0000000 d6 d0 ce c4<\/code><\/div>\n<div><\/div>\n<div><code>\/\/\u8f6c\u6362\u4e3aGB18030\u7f16\u7801<\/code><\/div>\n<div><code>iconv -f utf-8 -t gb18030 foo.txt &gt; foo.gb18030<\/code><\/div>\n<div><code>od -t x1 foo.gb18030<\/code><\/div>\n<div><code>0000000 d6 d0 ce c4<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<h1>C\u8bed\u8a00\u4e2d\u6587\u5904\u7406<\/h1>\n<p>\u5148\u660e\u786e\u4e00\u4e2a\u6982\u5ff5\uff1a\u7a0b\u5e8f\u5185\u90e8\u7f16\u7801\u548c\u7a0b\u5e8f\u5916\u90e8\u7f16\u7801\u3002\u7a0b\u5e8f\u5185\u90e8\u7f16\u7801\u6307\u7684\u662f\u4e2d\u6587\u5b57\u7b26\u5728\u7a0b\u5e8f\u8fd0\u884c\u65f6\u5728\u5185\u5b58\u4e2d\u7684\u7f16\u7801\u5f62\u5f0f\u3002\u7a0b\u5e8f\u5916\u90e8\u7f16\u7801\u5219\u662f\u4e2d\u6587\u5b57\u7b26\u5728\u5b58\u50a8\u6216\u8005\u4f20\u8f93\u65f6\u7684\u7f16\u7801\u5f62\u5f0f\u3002\u7a0b\u5e8f\u5916\u90e8\u7f16\u7801\u7684\u6700\u76f4\u89c2\u7684\u4f8b\u5b50\u5c31\u662f\u5f53\u628a\u4e2d\u6587\u5b58\u50a8\u5230\u786c\u76d8\u6587\u4ef6\u4e2d\u65f6\u9009\u62e9\u7684\u7f16\u7801\u3002<\/p>\n<p>\u6839\u636e\u7a0b\u5e8f\u5185\u90e8\u7f16\u7801\u548c\u7a0b\u5e8f\u5916\u90e8\u7f16\u7801\u662f\u5426\u4e00\u81f4\uff0cC\/C++\u7684\u4e2d\u6587\u5904\u7406\u6709\u4e24\u79cd\u5e38\u89c1\u7684\u65b9\u5f0f\uff1a<\/p>\n<ol>\n<li>\u5185\u5916\u7f16\u7801\u76f8\u540c\u3002\u8f93\u5165\u8f93\u51fa\u65f6\u4e0d\u9700\u8981\u8003\u8651\u7f16\u7801\u8f6c\u6362\uff0c\u7a0b\u5e8f\u5185\u90e8\u5904\u7406\u65f6\u628a\u4e2d\u6587\u5b57\u7b26\u5f53\u505a\u666e\u901a\u76842\u8fdb\u5236\u6570\u636e\u6d41\u8fdb\u884c\u5904\u7406\u3002<\/li>\n<li>\u5185\u5916\u7f16\u7801\u4e0d\u540c\u3002\u8f93\u5165\u8f93\u51fa\u7684\u65f6\u5019\u6839\u636e\u5e94\u7528\u9700\u8981\u9009\u62e9\u5408\u9002\u7684\u7f16\u7801\u683c\u5f0f\u8fdb\u884c\u7f16\u7801\u8f6c\u6362\uff1b\u7a0b\u5e8f\u5185\u90e8\u7edf\u4e00\u7f16\u7801\u5904\u7406\u3002<\/li>\n<\/ol>\n<p>\u65b9\u6cd51\u7684\u4f18\u70b9\u4e0d\u8a00\u800c\u55bb\uff0c\u7531\u4e8e\u5185\u5916\u7edf\u4e00\uff0c\u4e0d\u9700\u8981\u8fdb\u884c\u8f6c\u6362\u3002\u4e0d\u8db3\u662f\u5982\u679c\u4e0d\u662fC\u6807\u51c6\u5e93\u652f\u6301\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u90a3\u4e48\u5b57\u7b26\u4e32\u5904\u7406\u51fd\u6570\u9700\u8981\u81ea\u5df1\u5b9e\u73b0\u3002\u6bd4\u5982\u8bf4\u6807\u51c6strlen\u51fd\u6570\u4e0d\u80fd\u8ba1\u7b97\u4e2d\u6587\u7f16\u7801&amp;UTF-8\u7b49\u7684\u5b57\u7b26\u4e32\u957f\u5ea6\uff0c\u800c\u9700\u8981\u6839\u636e\u7f16\u7801\u6807\u51c6\u81ea\u884c\u5b9e\u73b0\u3002GBK\u7b49\u4e2d\u6587\u7f16\u7801\u9664\u4e86\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u51fd\u6570\u5916\uff0c\u5b57\u7b26\u4e32\u5339\u914d\u51fd\u6570\u4e5f\u8981\u81ea\u5df1\u5b9e\u73b0\uff08\u539f\u56e0\u770b\u4e0a\u6587\u4e2d\u6587\u7f16\u7801\u603b\u7ed3\uff09\u3002\u5f53\u9700\u8981\u652f\u6301\u7684\u7f16\u7801\u683c\u5f0f\u4e0d\u65ad\u589e\u591a\u65f6\uff0c\u5904\u7406\u51fd\u6570\u7684\u5f00\u53d1\u548c\u7ef4\u62a4\u5c31\u9700\u8981\u4ed8\u51fa\u66f4\u5927\u7684\u4ee3\u4ef7\u3002<\/p>\n<p>\u65b9\u6cd52\u9488\u5bf9\u65b9\u6cd51\u7684\u4e0d\u8db3\u52a0\u4ee5\u6539\u8fdb\u3002\u5728\u7a0b\u5e8f\u5185\u90e8\u53ef\u4ee5\u4f18\u5148\u9009\u62e9C\u6807\u51c6\u5e93\u652f\u6301\u7684\u7f16\u7801\u65b9\u5f0f\uff0c\u6216\u8005\u6839\u636e\u9700\u8981\u81ea\u5df1\u5b9e\u73b0\u5bf9\u67d0\u4e00\u7279\u5b9a\u7f16\u7801\u683c\u5f0f\u7684\u5b8c\u6574\u652f\u6301\uff0c\u8fd9\u6837\u4efb\u4f55\u7f16\u7801\u90fd\u53ef\u4ee5\u5148\u8f6c\u6362\u4e3a\u652f\u6301\u7684\u7f16\u7801\uff0c\u4ee3\u7801\u901a\u7528\u6027\u6bd4\u8f83\u597d\u3002<\/p>\n<p>\u90a3\u4e48C\u6807\u51c6\u5e93\u5bf9\u4e2d\u6587\u7f16\u7801\u7684\u652f\u6301\u5982\u4f55\u5462\uff1f\u76ee\u524dLinux\u5e73\u53f0\u4e00\u822c\u4f7f\u7528GNU C library\uff0c\u5185\u5efa\u4e86\u5bf9\u5355\u5b57\u8282\u7684char\u548c\u5bbd\u5b57\u7b26wchar_t\u7684\u652f\u6301\u3002Char\u5927\u5bb6\u90fd\u5f88\u719f\u6089\u4e86\uff0c\u5904\u7406\u4e2d\u6587\u9700\u8981\u7684wchar_t\u8981\u91cd\u70b9\u4ecb\u7ecd\u4e00\u4e0b\u3002\u4ece\u5b9e\u73b0\u4e0a\u6765\u8bf4\u5728linux\u5e73\u53f0\u4e0a\u53ef\u4ee5\u8ba4\u4e3awchar_t\u662f4byte\u7684int\uff0c\u5185\u90e8\u5b58\u50a8\u5b57\u7b26\u7684UTF32\u7f16\u7801\u3002\u7531\u4e8e\u6807\u51c6\u5e93\u5df2\u7ecf\u5185\u5efa\u4e86\u5bf9wchar_t\u6bd4\u8f83\u5b8c\u5907\u7684\u652f\u6301\uff0c\u5982\u4f7f\u7528wcslen\u00a0\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\uff0c\u4f7f\u7528wcscmp\u8fdb\u884c\u5b57\u7b26\u4e32\u6bd4\u8f83\u7b49\u7b49\u3002\u6240\u4ee5\u6bd4\u8f83\u7b80\u5355\u7684\u65b9\u5f0f\u662f\u4f7f\u7528\u4e0a\u9762\u7684\u65b9\u6cd52\uff0c\u540c\u65f6\u9009\u62e9wchar_t\u4f5c\u4e3a\u5185\u90e8\u5b57\u7b26\u7684\u8868\u793a\u3002\u505a\u5230\u8fd9\u4e00\u70b9\u8fd8\u662f\u6bd4\u8f83\u5bb9\u6613\u7684\uff0c\u5728\u8f93\u5165\u8f93\u51fa\u7684\u65f6\u5019\u901a\u8fc7mbrtowc\/wcrtomb\u00a0\u8fdb\u884c\u5355\u4e2a\u5b57\u7b26\u7684\u5185\u5916\u7f16\u7801\u8f6c\u6362\uff0c\u4ee5\u53ca\u901a\u8fc7mbsrtowcs\/wcsrtombs\u00a0\u8fdb\u884c\u5b57\u7b26\u4e32\u7684\u5185\u5916\u7f16\u7801\u8f6c\u6362\u5373\u53ef\u3002\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u4e24\u70b9\uff1a<\/p>\n<ol>\n<li>\u4ee3\u7801\u4e2d\u5b57\u7b26\u4e32\u5e38\u91cf\u7684\u8868\u793a\u4e0d\u540c\u3002\u4e3e\u4f8b\u8bf4\u660e\uff1aChar c=\u2019a\u2019; Wchar_t wc=L\u2019\u4e2d\u2019;<\/li>\n<li>\u4e0a\u9762\u4e24\u7ec4\u51fd\u6570\u7684\u8f6c\u6362\u662f\u4f9d\u8d56locale\u8bbe\u7f6e\u7684\uff0c\u5373locale\u51b3\u5b9a\u4e86\u5916\u90e8\u7f16\u7801\u7684\u7c7b\u578b\u3002\u786e\u5207\u7684\u8bf4\u662fLC_CTYPE\u51b3\u5b9a\u4e86\u5916\u90e8\u7f16\u7801\u7684\u7c7b\u578b\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u7a0b\u5e8f\u542f\u52a8\u65f6\u4f7f\u7528\u6807\u51c6\u201cC\u201dlocale\uff0c\u800c\u4e0d\u662fLC\u7cfb\u5217\u7684\u73af\u5883\u53d8\u91cf\u6307\u5b9a\u7684\u3002\u6240\u4ee5\u9700\u8981\u9996\u5148\u8c03\u7528\u4e0b\u9762\u7684\u51fd\u6570\uff1asetlocale (LC_ALL, \u201c\u201d);\u8fd9\u6837\u7a0b\u5e8f\u5c31\u4f7f\u7528\u4e86\u7528\u6237\u901a\u8fc7\u8bbe\u7f6eLC\u7cfb\u5217\u73af\u5883\u53d8\u91cf\u9009\u62e9\u7684Locale\u3002<\/li>\n<\/ol>\n<p>\u5173\u4e8elocale\u7684\u8bdd\u9898\u6bd4\u8f83\u5927\uff0c\u8fd9\u91cc\u5c31\u4e0d\u6df1\u5165\u4e86\uff0c\u7559\u5f85\u4e0b\u4e00\u7bc7\u6587\u7ae0\u5427.<\/p>\n<p>\u4e0a\u9762\u7684\u65b9\u6cd5\u5f88\u5b8c\u7f8e\uff0c\u662f\u5417\uff1f\u4e0d\u662f\u5417\uff1f\u5f97\u5230\u8fd9\u4e48\u591a\u7684\u597d\u5904\u4e0d\u662f\u65e0\u4ee3\u4ef7\u7684\uff0c\u6700\u660e\u663e\u7684\u4ee3\u4ef7\u5c31\u662f\u5185\u5b58\uff0c\u4efb\u4f55\u4e00\u4e2a\u5b57\u7b26\uff0c\u4e0d\u7ba1\u4e2d\u6587\u8fd8\u662f\u82f1\u6587\u5982\u679c\u4fdd\u6301\u5728wchar_t\u91cc\u5c31\u9700\u89814\u4e2abyte\uff0c\u5c31\u8fd9\u4e00\u4e2a\u7406\u7531\u5c31\u8db3\u4ee5\u9650\u5236\u4e86\u8fd9\u4e2a\u65b9\u6848\u5728\u5173\u6ce8\u5185\u5b58\u4f7f\u7528\u7684\u5e94\u7528\u573a\u666f\u4e0b\u7684\u4f7f\u7528\u3002<\/p>\n<h1>Python\u7684\u4e2d\u6587\u5904\u7406<\/h1>\n<p>\u5bf9Python\u6765\u8bf4\u7531\u4e8e\u5185\u5efaunicde\u7684\u652f\u6301\uff0c\u6240\u4ee5\u91c7\u7528\u8f93\u5165\u8f93\u51fa\u7684\u65f6\u5019\u8fdb\u884c\u8f6c\u6362\uff0c\u5185\u90e8\u4fdd\u6301unicode\u7684\u65b9\u5f0f\u4f7f\u7528\u662f\u4e2a\u4e0d\u9519\u7684\u65b9\u6848\u3002<a href=\"http:\/\/docs.python.org\/tutorial\/introduction.html#unicode-strings\">http:\/\/docs.python.org\/tutorial\/introduction.html#unicode-strings<\/a>\u8fd9\u91cc\u4f5c\u4e3a\u8d77\u70b9\uff0c\u6709\u5174\u8da3\u7684\u540c\u5b66\u81ea\u5b66\u5427\u3002<\/p>\n<h1>\u7f16\u7801\u9009\u62e9\u5efa\u8bae\uff1a<\/h1>\n<ol>\n<li>\u53ea\u6709\u82f1\u6587\uff1a\u6beb\u4e0d\u72b9\u8c6b\u9009\u62e9\u5185\u5916\u7f16\u7801\u90fd\u9009\u62e9ASCII\uff0c\u901a\u7528\u4e14\u5b58\u50a8\u4ee3\u4ef7\u5c0f\u3002<\/li>\n<li>\u4e3b\u8981\u5b58\u4e2d\u6587\uff0c\u5bf9\u5b58\u50a8\u5927\u5c0f\u6bd4\u8f83\u654f\u611f\uff1a\u5185\u5916\u90e8\u7f16\u7801\u6839\u636e\u6587\u5b57\u4f7f\u7528\u8303\u56f4\u9009\u62e9GB2312\u6216\u8005GBK\uff0c\u81ea\u884c\u5b9e\u73b0\u4f7f\u7528\u5230\u7684\u5b57\u7b26\u4e32\u5904\u7406\u51fd\u6570\u3002<\/li>\n<li>\u901a\u7528\u6027\u7b2c\u4e00\uff0c\u5904\u7406\u7b80\u5355\uff1a\u5916\u90e8\u9009\u62e9UTF-8\uff0c\u5185\u90e8\u53ef\u4ee5\u4f7f\u7528UTF-8\u6216\u8005UTF-32\uff08\u5373wchar_t\uff09<\/li>\n<\/ol>\n<p>\u53c2\u8003\u8d44\u6599\uff1a<\/p>\n<p><a href=\"http:\/\/baike.baidu.com\/view\/25492.htm\">http:\/\/baike.baidu.com\/view\/25492.htm<\/a><\/p>\n<p><a href=\"http:\/\/baike.baidu.com\/view\/25421.htm\">http:\/\/baike.baidu.com\/view\/25421.htm<\/a><\/p>\n<p><a href=\"http:\/\/baike.baidu.com\/view\/40801.htm\">http:\/\/baike.baidu.com\/view\/40801.htm<\/a><\/p>\n<p><a href=\"http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=%27GB%202312-1980%27&amp;XZ=Q\">http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=\u2019GB%202312-1980\u2032&amp;XZ=Q<\/a><\/p>\n<p><a href=\"http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=%27GB%2018030-2005%27&amp;XZ=Q\">http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=\u2019GB%2018030-2005\u2032&amp;XZ=Q<\/a><\/p>\n<p><a href=\"http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=%27GB%2013000-2010%27&amp;XZ=Q\">http:\/\/www.sac.gov.cn\/SACSearch\/search?channelid=160591&amp;templet=gjcxjg_detail.jsp&amp;searchword=STANDARD_CODE=\u2019GB%2013000-2010\u2032&amp;XZ=Q<\/a><\/p>\n<p><a href=\"http:\/\/www.unicode.org\/standard\/WhatIsUnicode.html\">http:\/\/www.unicode.org\/<\/a><\/p>\n<p><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/i18n\/unicode\/linuni\/\">http:\/\/www.ibm.com\/developerworks\/cn\/linux\/i18n\/unicode\/linuni\/<\/a><\/p>\n<p><a href=\"http:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/index.html\">http:\/\/www.gnu.org\/software\/libc\/manual\/html_node\/index.html<\/a><\/p>\n<p><a href=\"http:\/\/www.gnu.org\/software\/libiconv\/\">http:\/\/www.gnu.org\/software\/libiconv\/<\/a><\/p>\n<p>&#8212;- &#8212;- &#8212;-<\/p>\n<p>http:\/\/www.searchtb.com\/2012\/04\/chinese_encode.html<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0\u6842\u5357 \u7f16\u7801\u95ee\u9898\u7684\u4f8b\u5b50 \u5728windows\u81ea\u5e26\u7684notepad\uff08\u8bb0\u4e8b\u672c\uff09\u7a0b\u5e8f\u4e2d\u8f93\u5165 &hellip; <a href=\"https:\/\/ufqi.com\/blog\/%e8%bd%ac%ef%bc%9a%e4%b8%ad%e6%96%87%e7%bc%96%e7%a0%81%e6%9d%82%e8%b0%88\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,6,2],"tags":[49,50,51],"_links":{"self":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/755"}],"collection":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/comments?post=755"}],"version-history":[{"count":1,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":756,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions\/756"}],"wp:attachment":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/categories?post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/tags?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}