{"id":21315,"date":"2024-11-19T12:30:05","date_gmt":"2024-11-19T04:30:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21315\/"},"modified":"2024-11-19T12:30:05","modified_gmt":"2024-11-19T04:30:05","slug":"vscode%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e7%bc%96%e7%a0%81%e4%b8%bagbk","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21315\/","title":{"rendered":"vscode\u600e\u4e48\u8bbe\u7f6e\u7f16\u7801\u4e3agbk"},"content":{"rendered":"<blockquote><p>\n  \u5982\u4f55\u4fee\u6539 vscode \u7f16\u7801\u4e3a gbk\uff1f1. \u6253\u5f00\u7528\u6237\u8bbe\u7f6e\uff1b2. \u641c\u7d22\u5e76\u4fee\u6539\u201cfiles.encoding\u201d\u4e3a\u201cgbk\u201d\uff1b3. \u4fdd\u5b58\u66f4\u6539\u5e76\u91cd\u542f vscode\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051508302235316.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u8bbe\u7f6e\u7f16\u7801\u4e3agbk\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u8bbe\u7f6e\u7f16\u7801\u4e3agbk\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5c06 Visual Studio Code \u7684\u7f16\u7801\u8bbe\u7f6e\u4fee\u6539\u4e3a GBK<\/strong><\/p>\n<p>\u8981\u5c06 Visual Studio Code\uff08VSCode\uff09\u7684\u7f16\u7801\u8bbe\u7f6e\u4fee\u6539\u4e3a GBK\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\uff1a<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u7528\u6237\u8bbe\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>Windows\/Linux\uff1aCtrl + ,<\/li>\n<li>macOS\uff1aCmd + ,<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5728\u641c\u7d22\u680f\u4e2d\u641c\u7d22\u201cencoding\u201d\uff1a<\/strong><\/p>\n<ul>\n<li>\u5728\u5de6\u4e0a\u89d2\u7684\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cencoding\u201d\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4fee\u6539\u201cfiles.encoding\u201d\u8bbe\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\u627e\u5230\u201cfiles.encoding\u201d\u8bbe\u7f6e\u3002<\/li>\n<li>\n<p>\u5355\u51fb\u7f16\u8f91\u56fe\u6807\uff08\u94c5\u7b14\u5f62\uff09\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<pre>\"files.encoding\": \"gbk\"<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u66f4\u6539\uff1a<\/strong><\/p>\n<ul>\n<li>\u5355\u51fb\u201c\u786e\u5b9a\u201d\u6309\u94ae\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<li>\u6216\u8005\uff0c\u6309 Ctrl + S (Windows\/Linux) \u6216 Cmd + S (macOS) \u4fdd\u5b58\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u91cd\u542f VSCode\uff1a<\/strong><\/p>\n<ul>\n<li>\u91cd\u542f VSCode \u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u73b0\u5728\uff0cVSCode \u5c06\u4f7f\u7528 GBK \u7f16\u7801\u6253\u5f00\u548c\u4fdd\u5b58\u6587\u4ef6\u3002\u8bf7\u6ce8\u610f\uff0c\u6b64\u8bbe\u7f6e\u53ea\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\uff0c\u5176\u4ed6\u7528\u6237\u9700\u8981\u91cd\u590d\u4e0a\u8ff0\u6b65\u9aa4\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8bbe\u7f6e\u7f16\u7801\u4e3agbk\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>\u5982\u4f55\u4fee\u6539 vscode \u7f16\u7801\u4e3a gbk\uff1f1. \u6253\u5f00\u7528\u6237\u8bbe\u7f6e\uff1b2. \u641c\u7d22\u5e76\u4fee\u6539\u201cfiles.encoding\u201d\u4e3a\u201cgbk\u201d\uff1b3. \u4fdd\u5b58\u66f4\u6539\u5e76\u91cd\u542f vscode\u3002 \u5982\u4f55\u5c06 Visual Studio Code \u7684\u7f16\u7801\u8bbe\u7f6e\u4fee\u6539\u4e3a GBK \u8981\u5c06 Visual Studio Code\uff08VSCode\uff09\u7684\u7f16\u7801\u8bbe\u7f6e\u4fee\u6539\u4e3a GBK\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\uff1a \u6253\u5f00\u7528\u6237\u8bbe\u7f6e\uff1a Windows\/Linux\uff1aCtrl + , macOS\uff1aCmd + , \u5728\u641c\u7d22\u680f\u4e2d\u641c\u7d22\u201cencoding\u201d\uff1a \u5728\u5de6\u4e0a\u89d2\u7684\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cencoding\u201d\u3002 \u4fee\u6539\u201cfiles.encoding\u201d\u8bbe\u7f6e\uff1a \u5728\u641c\u7d22\u7ed3\u679c\u4e2d\u627e\u5230\u201cfiles.encoding\u201d\u8bbe\u7f6e\u3002 \u5355\u51fb\u7f16\u8f91\u56fe\u6807\uff08\u94c5\u7b14\u5f62\uff09\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a &#8220;files.encoding&#8221;: &#8220;gbk&#8221; \u767b\u5f55\u540e\u590d\u5236 \u4fdd\u5b58\u66f4\u6539\uff1a \u5355\u51fb\u201c\u786e\u5b9a\u201d\u6309\u94ae\u4fdd\u5b58\u66f4\u6539\u3002 \u6216\u8005\uff0c\u6309 Ctrl + S (Windows\/Linux) \u6216 Cmd + S (macOS) \u4fdd\u5b58\u3002 \u91cd\u542f VSCode\uff1a \u91cd\u542f VSCode \u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002 \u73b0\u5728\uff0cVSCode \u5c06\u4f7f\u7528 GBK [&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-21315","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21315","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=21315"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21315\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}