{"id":268519,"date":"2023-03-29T04:04:17","date_gmt":"2023-03-28T20:04:17","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtbbazuzfjr.html"},"modified":"2023-03-29T04:04:17","modified_gmt":"2023-03-28T20:04:17","slug":"lxtbbazuzfjr","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtbbazuzfjr.html","title":{"rendered":"Linux\u7cfb\u7edf\u5fc5\u5907\uff1a\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff0c\u8ba9\u4f60\u7684\u6587\u4ef6\u5904\u7406\u66f4\u8f7b\u677e\uff088\u4f4d\u65e0\u754c\uff09"},"content":{"rendered":"

\u5982\u679c\u4f60\u662f\u4e00\u540dLinux<\/a>\u7528\u6237\uff0c\u90a3\u4e48\u4f60\u4e00\u5b9a\u77e5\u9053UTF-8\u5b57\u7b26\u96c6\u7684\u91cd\u8981\u6027\u3002UTF-8\u662f\u4e00\u79cd\u7528\u4e8eUnicode\u5b57\u7b26\u7f16\u7801\u7684\u53ef\u53d8\u957f\u5ea6\u5b57\u7b26\u7f16\u7801linux\u7cfb\u7edf\u5165\u95e8\u5b66\u4e60\uff0c\u5b83\u53ef\u4ee5\u652f\u6301\u4e16\u754c\u4e0a\u51e0\u4e4e\u6240\u6709\u7684\u8bed\u8a00\u3002\u800c\u5728Linux\u7cfb\u7edf<\/a>\u4e2dlinux\u5b89\u88c5utf8\u5b57\u7b26\u96c6<\/strong>\uff0c\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002\u672c\u6587\u5c06\u4e3a\u60a8\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u3002<\/p>\n

1.\u4ec0\u4e48\u662fUTF-8\u5b57\u7b26\u96c6\uff1f<\/p>\n

UTF-8\uff088-bit Unicode Transformation Format\uff09\u662f\u4e00\u79cd\u9488\u5bf9Unicode\u8bbe\u8ba1\u7684\u53ef\u53d8\u957f\u5ea6\u5b57\u7b26\u7f16\u7801\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8868\u793aUnicode\u6807\u51c6\u4e2d\u7684\u4efb\u4f55\u5b57\u7b26\u3002\u8fd9\u4e2a\u7f16\u7801\u65b9\u5f0f\u7531Ken Thompson\u548cRob Pike\u53d1\u660elinux\u5b89\u88c5utf8\u5b57\u7b26\u96c6<\/strong>\uff0c\u5e76\u57281993\u5e74\u9996\u6b21\u4f7f\u7528\u3002\u73b0\u5728\u5df2\u7ecf\u6210\u4e3a\u4e92\u8054\u7f51\u4e0a\u6700\u5e38\u7528\u7684\u7f16\u7801\u65b9\u5f0f\u4e4b\u4e00\u3002<\/p>\n

2.\u4e3a\u4ec0\u4e48\u9700\u8981\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff1f<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff0c\u90a3\u4e48\u5c31\u65e0\u6cd5\u6b63\u786e\u5730\u663e\u793a\u5305\u542b\u975e\u82f1\u6587\u5b57\u7b26\uff08\u5982\u4e2d\u6587\u3001\u65e5\u6587\u3001\u97e9\u6587\u7b49\uff09\u7684\u6587\u672c\u6587\u4ef6\u3002\u6b64\u5916\uff0c\u5728\u4f7f\u7528\u4e00\u4e9b\u8f6f\u4ef6\u65f6\u4e5f\u53ef\u80fd\u4f1a\u51fa\u73b0\u4e71\u7801\u7b49\u95ee\u9898\u3002\u56e0\u6b64\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002<\/p>\n

3.\u5982\u4f55\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff1f<\/p>\n

\u5728\u5927\u591a\u6570Linux\u7cfb\u7edf\u4e2d\uff0cUTF-8\u5b57\u7b26\u96c6\u90fd\u5df2\u7ecf\u9884\u5148\u5b89\u88c5\u597d\u4e86\u3002\u4f46\u662f\u5e38\u7528linux\u7cfb\u7edf\uff0c\u5982\u679c\u60a8\u7684\u7cfb\u7edf\u4e0a\u6ca1\u6709\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n

1.\u6253\u5f00\u7ec8\u7aef\uff0c\u5e76\u4f7f\u7528root\u7528\u6237\u767b\u5f55\uff1b<\/p>\n

2.\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4<\/a>\u4ee5\u66f4\u65b0\u7cfb\u7edf\u8f6f\u4ef6\u5305\u5217\u8868\uff1a<\/p>\n

\n

\nsudo apt-get update\n<\/pre>\n<\/p>\n

3.\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff1a<\/p>\n

\n

\nsudo apt-get install language-pack-zh-hans\n<\/pre>\n<\/p>\n

4.\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\u5373\u53ef\u3002<\/p>\n

4.\u600e\u6837\u6d4b\u8bd5UTF-8\u5b57\u7b26\u96c6\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1f<\/p>\n

\u5b89\u88c5\u5b8c\u6210UTF-8\u5b57\u7b26\u96c6\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u6d4b\u8bd5\u5b83\u662f\u5426\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\uff1a<\/p>\n

\n

\necho $LANG\n<\/pre>\n<\/p>\n

\u5982\u679c\u8f93\u51fa\u7ed3\u679c\u4e3azh_CN.UTF-8\u6216zh_TW.UTF-8\u7b49\uff0c\u5219\u8bf4\u660eUTF-8\u5b57\u7b26\u96c6\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u3002\u5426\u5219\uff0c\u8bf7\u91cd\u65b0\u68c0\u67e5\u662f\u5426\u6309\u7167\u4ee5\u4e0a\u6b65\u9aa4\u6b63\u786e\u5730\u8fdb\u884c\u4e86\u64cd\u4f5c\u3002<\/p>\n

5. UTF-8\u5b57\u7b26\u96c6\u7684\u5e94\u7528\u573a\u666f<\/p>\n

UTF-8\u5b57\u7b26\u96c6\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\u3001\u7f16\u7a0b\u8bed\u8a00\u548c\u7f51\u7ad9\u4e2d\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0cUTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u7528\u4e8e\u663e\u793a\u5404\u79cd\u8bed\u8a00\u7684\u6587\u672c\u6587\u4ef6\u3001\u652f\u6301\u5404\u79cd\u8bed\u8a00\u7684\u8f93\u5165\u6cd5\u3001\u4f7f\u5f97\u4e00\u4e9b\u8f6f\u4ef6\u80fd\u591f\u6b63\u5e38\u5de5\u4f5c\u7b49\u3002<\/p>\n

6. UTF-8\u5b57\u7b26\u96c6\u4e0e\u5176\u4ed6\u7f16\u7801\u65b9\u5f0f\u7684\u533a\u522b<\/p>\n

\u4e0eGB2312\u3001GBK\u7b49\u7f16\u7801\u65b9\u5f0f\u76f8\u6bd4\uff0cUTF-8\u5177\u6709\u4ee5\u4e0b\u4f18\u70b9\uff1a<\/p>\n

1.\u652f\u6301\u6240\u6709Unicode\u5b57\u7b26\uff0c\u5305\u62ec\u4e16\u754c\u4e0a\u51e0\u4e4e\u6240\u6709\u7684\u8bed\u8a00\uff1b<\/p>\n

2.\u53ef\u4ee5\u6839\u636e\u9700\u8981\u4f7f\u75281~4\u4e2a\u5b57\u8282\u6765\u8868\u793a\u4e00\u4e2a\u5b57\u7b26\uff0c\u8282\u7701\u4e86\u5b58\u50a8\u7a7a\u95f4\uff1b<\/p>\n

3.\u517c\u5bb9ASCII\u7f16\u7801\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u82f1\u6587\u5b57\u7b26\u800c\u4e0d\u9700\u8981\u8f6c\u6362\u3002<\/p>\n

7. UTF-8\u5b57\u7b26\u96c6\u7684\u7f3a\u70b9<\/p>\n

UTF-8\u5b57\u7b26\u96c6\u4e5f\u6709\u4e00\u4e9b\u7f3a\u70b9\uff0c\u5305\u62ec\uff1a<\/p>\n

1.\u5bf9\u4e8e\u67d0\u4e9b\u5b57\u7b26\uff0cUTF-8\u7f16\u7801\u65b9\u5f0f\u9700\u8981\u4f7f\u7528\u591a\u4e2a\u5b57\u8282\uff0c\u56e0\u6b64\u5728\u5904\u7406\u5927\u91cf\u6587\u672c\u65f6\u53ef\u80fd\u4f1a\u5f71\u54cd\u6027\u80fd\uff1b<\/p>\n

2.\u5728\u4e00\u4e9b\u8001\u65e7\u7684\u8f6f\u4ef6\u4e2d\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u5730\u652f\u6301UTF-8\u7f16\u7801\u65b9\u5f0f\u3002<\/p>\n

8.\u603b\u7ed3<\/p>\n

\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u3001\u6d4b\u8bd5UTF-8\u5b57\u7b26\u96c6\u662f\u5426\u5b89\u88c5\u6210\u529f\u3001UTF-8\u5b57\u7b26\u96c6\u7684\u5e94\u7528\u573a\u666f\u4ee5\u53ca\u4e0e\u5176\u4ed6\u7f16\u7801\u65b9\u5f0f\u7684\u533a\u522b\u548c\u7f3a\u70b9\u7b49\u65b9\u9762\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u800c\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002\u56e0\u6b64\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002\u5728\u5927\u591a\u6570Linux\u7cfb\u7edf\u4e2d\uff0cUTF-8\u5b57\u7b26\u96c6\u90fd\u5df2\u7ecf\u9884\u5148\u5b89\u88c5\u597d\u4e86\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u7684\u7cfb\u7edf\u4e0a\u6ca1\u6709\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\uff0c\u90a3\u4e48\u60a8\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u5b89\u88c5\uff1a\u5728Linux\u7cfb\u7edf\u4e2d\u5b89\u88c5UTF-8\u5b57\u7b26\u96c6\u53ef\u4ee5\u4f7f\u5f97\u6211\u4eec\u7684\u7cfb\u7edf\u66f4\u52a0\u667a\u80fd\u3001\u66f4\u52a0\u6613\u7528\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-268519","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=268519"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268519\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=268519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=268519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=268519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}