{"id":21316,"date":"2024-11-19T13:57:20","date_gmt":"2024-11-19T05:57:20","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21316\/"},"modified":"2024-11-19T13:57:20","modified_gmt":"2024-11-19T05:57:20","slug":"vscode%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e9%bb%98%e8%ae%a4utf8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21316\/","title":{"rendered":"vscode\u600e\u4e48\u8bbe\u7f6e\u9ed8\u8ba4utf8"},"content":{"rendered":"<blockquote><p>\n  vscode \u9ed8\u8ba4\u4f7f\u7528 utf-8 \u7f16\u7801\u3002\u4f46\u82e5\u9047\u5230\u7f16\u7801\u95ee\u9898\uff0c\u53ef\u6309\u4ee5\u4e0b\u6b65\u9aa4\u8bbe\u7f6e\uff1a\u6253\u5f00\u7528\u6237\u8bbe\u7f6e\u5e76\u641c\u7d22&#8221;\u7f16\u7801&#8221;\u3002\u8bbe\u7f6e&#8221;files.encoding&#8221;\u4e3a &#8220;utf8&#8243;\u3002\u8bbe\u7f6e&#8221;files.autoguessencoding&#8221;\u4e3a &#8220;true&#8221;\u3002\u91cd\u65b0\u542f\u52a8 vscode\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051508331645775.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u8bbe\u7f6e\u9ed8\u8ba4utf8\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u8bbe\u7f6e\u9ed8\u8ba4utf8\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5c06 Visual Studio Code \u7684\u9ed8\u8ba4\u7f16\u7801\u8bbe\u7f6e\u4e3a UTF-8<\/strong><\/p>\n<p>Visual Studio Code (VSCode) \u9ed8\u8ba4\u4f7f\u7528 UTF-8 \u7f16\u7801\uff0c\u65e0\u9700\u624b\u52a8\u8bbe\u7f6e\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u9047\u5230\u7f16\u7801\u95ee\u9898\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u5c06 VSCode \u7684\u9ed8\u8ba4\u7f16\u7801\u660e\u786e\u8bbe\u7f6e\u4e3a UTF-8\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u7528\u6237\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>Windows\/Linux\uff1aCtrl + ,<\/li>\n<li>Mac\uff1aCmd + ,<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165&#8221;\u7f16\u7801&#8221;<\/strong><\/li>\n<li>\n<p><strong>\u5728&#8221;Files: Encoding&#8221;\u4e0b\uff0c\u627e\u5230\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>&#8220;files.encoding&#8221;: \u5c06\u5176\u8bbe\u7f6e\u4e3a &#8220;utf8&#8221;<\/li>\n<li>&#8220;files.autoGuessEncoding&#8221;: \u5c06\u5176\u8bbe\u7f6e\u4e3a &#8220;true&#8221;<\/li>\n<\/ul>\n<\/li>\n<li><strong>\u91cd\u65b0\u542f\u52a8 VSCode<\/strong><\/li>\n<\/ol>\n<p>\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u540e\uff0cVSCode \u5c06\u4f7f\u7528 UTF-8 \u4f5c\u4e3a\u6240\u6709\u6587\u4ef6\u7c7b\u578b\uff08\u5305\u62ec\u65b0\u521b\u5efa\u7684\u6587\u4ef6\uff09\u7684\u9ed8\u8ba4\u7f16\u7801\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8bbe\u7f6e\u9ed8\u8ba4utf8\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>vscode \u9ed8\u8ba4\u4f7f\u7528 utf-8 \u7f16\u7801\u3002\u4f46\u82e5\u9047\u5230\u7f16\u7801\u95ee\u9898\uff0c\u53ef\u6309\u4ee5\u4e0b\u6b65\u9aa4\u8bbe\u7f6e\uff1a\u6253\u5f00\u7528\u6237\u8bbe\u7f6e\u5e76\u641c\u7d22&#8221;\u7f16\u7801&#8221;\u3002\u8bbe\u7f6e&#8221;files.encoding&#8221;\u4e3a &#8220;utf8&#8243;\u3002\u8bbe\u7f6e&#8221;files.autoguessencoding&#8221;\u4e3a &#8220;true&#8221;\u3002\u91cd\u65b0\u542f\u52a8 vscode\u3002 \u5982\u4f55\u5c06 Visual Studio Code \u7684\u9ed8\u8ba4\u7f16\u7801\u8bbe\u7f6e\u4e3a UTF-8 Visual Studio Code (VSCode) \u9ed8\u8ba4\u4f7f\u7528 UTF-8 \u7f16\u7801\uff0c\u65e0\u9700\u624b\u52a8\u8bbe\u7f6e\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u9047\u5230\u7f16\u7801\u95ee\u9898\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u5c06 VSCode \u7684\u9ed8\u8ba4\u7f16\u7801\u660e\u786e\u8bbe\u7f6e\u4e3a UTF-8\uff1a \u6253\u5f00\u7528\u6237\u8bbe\u7f6e Windows\/Linux\uff1aCtrl + , Mac\uff1aCmd + , \u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165&#8221;\u7f16\u7801&#8221; \u5728&#8221;Files: Encoding&#8221;\u4e0b\uff0c\u627e\u5230\u4ee5\u4e0b\u8bbe\u7f6e\uff1a &#8220;files.encoding&#8221;: \u5c06\u5176\u8bbe\u7f6e\u4e3a &#8220;utf8&#8221; &#8220;files.autoGuessEncoding&#8221;: \u5c06\u5176\u8bbe\u7f6e\u4e3a &#8220;true&#8221; \u91cd\u65b0\u542f\u52a8 VSCode \u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u540e\uff0cVSCode \u5c06\u4f7f\u7528 UTF-8 \u4f5c\u4e3a\u6240\u6709\u6587\u4ef6\u7c7b\u578b\uff08\u5305\u62ec\u65b0\u521b\u5efa\u7684\u6587\u4ef6\uff09\u7684\u9ed8\u8ba4\u7f16\u7801\u3002 \u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8bbe\u7f6e\u9ed8\u8ba4utf8\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-21316","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21316","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=21316"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21316\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}