{"id":20512,"date":"2024-11-19T10:53:13","date_gmt":"2024-11-19T02:53:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20512\/"},"modified":"2024-11-19T10:53:13","modified_gmt":"2024-11-19T02:53:13","slug":"vscode%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e4%b8%ad%e6%96%87%e7%bc%96%e7%a0%81%e6%a0%bc%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20512\/","title":{"rendered":"vscode\u600e\u4e48\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f"},"content":{"rendered":"<blockquote><p>\n  \u5728 vs code \u4e2d\uff0c\u901a\u8fc7\u8bbe\u7f6e\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e3a\u201cutf-8\u201d\uff0c\u5373\u53ef\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\uff0c\u786e\u4fdd\u4e2d\u6587\u5b57\u7b26\u7684\u6b63\u786e\u663e\u793a\u548c\u5904\u7406\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040302571720735.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VS Code \u4e2d\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f<\/strong><\/p>\n<p>\u5728 Visual Studio Code (VS Code) \u4e2d\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li> <strong>\u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u9762\u677f\uff1a<\/strong>\u6309 Ctrl + , (Windows\/Linux) \u6216 Cmd + , (macOS) \u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u9762\u677f\u3002<\/li>\n<li> <strong>\u641c\u7d22\u201c\u6587\u4ef6\u7f16\u7801\u201d\uff1a<\/strong>\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4ee5\u67e5\u627e\u76f8\u5173\u8bbe\u7f6e\u3002<\/li>\n<li> <strong>\u627e\u5230\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e\uff1a<\/strong>\u5728\u201c\u8bbe\u7f6e\u201d\u5217\u8868\u4e2d\uff0c\u627e\u5230\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e\uff0c\u5b83\u5e94\u8be5\u4f4d\u4e8e\u201c\u7528\u6237\u8bbe\u7f6e\u201d\u90e8\u5206\u3002<\/li>\n<li> <strong>\u9009\u62e9\u201cUTF-8\u201d\uff1a<\/strong>\u4ece\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u201cUTF-8\u201d\u3002<\/li>\n<\/ol>\n<p><strong>\u5176\u4ed6\u53ef\u9009\u8bbe\u7f6e\uff1a<\/strong><\/p>\n<p>\u9664\u4e86\u8bbe\u7f6e\u6587\u4ef6\u7f16\u7801\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5176\u4ed6\u76f8\u5173\u8bbe\u7f6e\uff1a<\/p>\n<ul>\n<li> <strong>\u68c0\u6d4b UTF-8 BOM\uff1a<\/strong>\u542f\u7528\u6b64\u8bbe\u7f6e\u4ee5\u8ba9 VS Code \u81ea\u52a8\u68c0\u6d4b\u6587\u4ef6\u4e2d\u7684 UTF-8 \u5b57\u8282\u987a\u5e8f\u6807\u8bb0 (BOM)\u3002<\/li>\n<li> <strong>\u81ea\u52a8\u4fdd\u5b58\uff1a<\/strong>\u542f\u7528\u6b64\u8bbe\u7f6e\u4ee5\u8ba9 VS Code \u81ea\u52a8\u4fdd\u5b58\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n<p>\u4ee5 UTF-8 \u7f16\u7801\u683c\u5f0f\u4fdd\u5b58\u4e2d\u6587\u6587\u4ef6\u5177\u6709\u4ee5\u4e0b\u4f18\u70b9\uff1a<\/p>\n<ul>\n<li> <strong>\u901a\u7528\u6027\uff1a<\/strong>UTF-8 \u662f\u6700\u5e7f\u6cdb\u4f7f\u7528\u7684 Unicode \u7f16\u7801\u6807\u51c6\uff0c\u53ef\u652f\u6301\u591a\u79cd\u8bed\u8a00\u548c\u5b57\u7b26\u3002<\/li>\n<li> <strong>\u517c\u5bb9\u6027\uff1a<\/strong>UTF-8 \u517c\u5bb9\u6240\u6709\u64cd\u4f5c\u7cfb\u7edf\u548c\u5927\u591a\u6570\u7f16\u7a0b\u8bed\u8a00\u3002<\/li>\n<li> <strong>\u591a\u5b57\u8282\u5b57\u7b26\u652f\u6301\uff1a<\/strong>UTF-8 \u53ef\u4ee5\u6709\u6548\u5730\u8868\u793a\u4e2d\u6587\u7b49\u591a\u5b57\u8282\u5b57\u7b26\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 vs code \u4e2d\uff0c\u901a\u8fc7\u8bbe\u7f6e\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e3a\u201cutf-8\u201d\uff0c\u5373\u53ef\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\uff0c\u786e\u4fdd\u4e2d\u6587\u5b57\u7b26\u7684\u6b63\u786e\u663e\u793a\u548c\u5904\u7406\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002 \u5982\u4f55\u5728 VS Code \u4e2d\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f \u5728 Visual Studio Code (VS Code) \u4e2d\u8bbe\u7f6e\u4e2d\u6587\u7f16\u7801\u683c\u5f0f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a \u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u9762\u677f\uff1a\u6309 Ctrl + , (Windows\/Linux) \u6216 Cmd + , (macOS) \u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u9762\u677f\u3002 \u641c\u7d22\u201c\u6587\u4ef6\u7f16\u7801\u201d\uff1a\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4ee5\u67e5\u627e\u76f8\u5173\u8bbe\u7f6e\u3002 \u627e\u5230\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e\uff1a\u5728\u201c\u8bbe\u7f6e\u201d\u5217\u8868\u4e2d\uff0c\u627e\u5230\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e\uff0c\u5b83\u5e94\u8be5\u4f4d\u4e8e\u201c\u7528\u6237\u8bbe\u7f6e\u201d\u90e8\u5206\u3002 \u9009\u62e9\u201cUTF-8\u201d\uff1a\u4ece\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u201cUTF-8\u201d\u3002 \u5176\u4ed6\u53ef\u9009\u8bbe\u7f6e\uff1a \u9664\u4e86\u8bbe\u7f6e\u6587\u4ef6\u7f16\u7801\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5176\u4ed6\u76f8\u5173\u8bbe\u7f6e\uff1a \u68c0\u6d4b UTF-8 BOM\uff1a\u542f\u7528\u6b64\u8bbe\u7f6e\u4ee5\u8ba9 VS Code \u81ea\u52a8\u68c0\u6d4b\u6587\u4ef6\u4e2d\u7684 UTF-8 \u5b57\u8282\u987a\u5e8f\u6807\u8bb0 (BOM)\u3002 \u81ea\u52a8\u4fdd\u5b58\uff1a\u542f\u7528\u6b64\u8bbe\u7f6e\u4ee5\u8ba9 VS Code \u81ea\u52a8\u4fdd\u5b58\u6587\u4ef6\u3002 \u4f18\u70b9\uff1a \u4ee5 UTF-8 \u7f16\u7801\u683c\u5f0f\u4fdd\u5b58\u4e2d\u6587\u6587\u4ef6\u5177\u6709\u4ee5\u4e0b\u4f18\u70b9\uff1a \u901a\u7528\u6027\uff1aUTF-8 \u662f\u6700\u5e7f\u6cdb\u4f7f\u7528\u7684 Unicode \u7f16\u7801\u6807\u51c6\uff0c\u53ef\u652f\u6301\u591a\u79cd\u8bed\u8a00\u548c\u5b57\u7b26\u3002 \u517c\u5bb9\u6027\uff1aUTF-8 \u517c\u5bb9\u6240\u6709\u64cd\u4f5c\u7cfb\u7edf\u548c\u5927\u591a\u6570\u7f16\u7a0b\u8bed\u8a00\u3002 \u591a\u5b57\u8282\u5b57\u7b26\u652f\u6301\uff1aUTF-8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20512","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20512"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20512\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}