{"id":21374,"date":"2024-11-19T13:37:02","date_gmt":"2024-11-19T05:37:02","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21374\/"},"modified":"2024-11-19T13:37:02","modified_gmt":"2024-11-19T05:37:02","slug":"vscode%e6%80%8e%e4%b9%88%e6%94%b9%e5%8f%98%e7%bc%96%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21374\/","title":{"rendered":"vscode\u600e\u4e48\u6539\u53d8\u7f16\u7801"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u66f4\u6539\u7f16\u7801\uff1a\u6253\u5f00\u8bbe\u7f6e\u83dc\u5355\uff0c\u641c\u7d22\u201c\u7f16\u7801\u201d\u3002\u5728\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9\u6240\u9700\u7f16\u7801\u3002\u91cd\u65b0\u6253\u5f00\u6587\u4ef6\u4ee5\u5e94\u7528\u65b0\u8bbe\u7f6e\u3002\u4e3a\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\uff0c\u5c06\u201c\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\u201d\u8bbe\u7f6e\u4e3a\u201c\u5f00\u201d\u3002\u53ef\u4ece\u72b6\u6001\u680f\u3001\u5feb\u6377\u952e\u6216\u547d\u4ee4\u9762\u677f\u66f4\u6539\u7f16\u7801\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/27\/2024052712512287113.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u6539\u53d8\u7f16\u7801\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u6539\u53d8\u7f16\u7801\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u66f4\u6539 VSCode \u7684\u7f16\u7801<\/strong><\/p>\n<p>Visual Studio Code\uff08VSCode\uff09\u662f\u4e00\u79cd\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u6539\u6587\u4ef6\u7f16\u7801\u7684\u9009\u9879\uff0c\u4ee5\u4fbf\u5f00\u53d1\u8005\u4ee5\u4ed6\u4eec\u9009\u62e9\u7684\u683c\u5f0f\u67e5\u770b\u548c\u7f16\u8f91\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 VSCode \u4e2d\u66f4\u6539\u7f16\u7801\uff1a<\/p>\n<p><strong>1. \u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u83dc\u5355<\/strong><\/p>\n<ul>\n<li>\u5728 Windows \u548c Linux \u4e0a\uff1a\u6309 Ctrl + ,<\/li>\n<li>\u5728 macOS \u4e0a\uff1a\u6309 Cmd + ,<\/li>\n<\/ul>\n<p><strong>2. \u641c\u7d22\u201c\u7f16\u7801\u201d<\/strong><\/p>\n<ul>\n<li>\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cencoding\u201d\u4ee5\u67e5\u627e\u4e0e\u7f16\u7801\u76f8\u5173\u7684\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><strong>3. \u66f4\u6539\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>\n<p>\u5728\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u6240\u9700\u7684\u7f16\u7801\u3002\u5e38\u7528\u7684\u9009\u9879\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>UTF-8<\/li>\n<li>UTF-16LE<\/li>\n<li>UTF-16BE<\/li>\n<li>GBK<\/li>\n<li>Shift_JIS<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>4. \u91cd\u65b0\u6253\u5f00\u6587\u4ef6<\/strong><\/p>\n<ul>\n<li>\u66f4\u6539\u7f16\u7801\u540e\uff0c\u91cd\u65b0\u6253\u5f00\u6587\u4ef6\u4ee5\u5e94\u7528\u65b0\u7684\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><strong>5. \u81ea\u52a8\u68c0\u6d4b\u7f16\u7801<\/strong><\/p>\n<ul>\n<li>VSCode \u8fd8\u63d0\u4f9b\u81ea\u52a8\u68c0\u6d4b\u6587\u4ef6\u7f16\u7801\u7684\u529f\u80fd\u3002\u8981\u542f\u7528\u6b64\u529f\u80fd\uff0c\u8bf7\u5728\u201c\u8bbe\u7f6e\u201d\u4e2d\u5c06\u201c\u7f16\u7801\u201d\u4e0b\u7684\u201c\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\u201d\u8bbe\u7f6e\u4e3a\u201c\u5f00\u201d\u3002<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u9009\u9879\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u4ece\u53f3\u4e0b\u89d2\u72b6\u6001\u680f\u66f4\u6539\u7f16\u7801\uff1a<\/strong>\u5f53\u6587\u4ef6\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u65f6\uff0c\u53ef\u4ee5\u5728\u53f3\u4e0b\u89d2\u7684\u72b6\u6001\u680f\u4e2d\u5355\u51fb\u7f16\u7801\u8bbe\u7f6e\u5e76\u9009\u62e9\u6240\u9700\u7684\u7f16\u7801\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u5feb\u6377\u952e\uff1a<\/strong>\u4f7f\u7528 Alt + E + C \u5feb\u6377\u952e\uff08Windows \u548c Linux\uff09\u6216 Cmd + E + C \u5feb\u6377\u952e\uff08macOS\uff09\u5feb\u901f\u66f4\u6539\u7f16\u7801\u3002<\/li>\n<li> <strong>\u4f7f\u7528\u547d\u4ee4\u9762\u677f\uff1a<\/strong>\u6309 Ctrl + Shift + P\uff08Windows \u548c Linux\uff09\u6216 Cmd + Shift + P\uff08macOS\uff09\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u7136\u540e\u8f93\u5165 configure encoding \u4ee5\u66f4\u6539\u7f16\u7801\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u6539\u53d8\u7f16\u7801\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 vscode \u4e2d\u66f4\u6539\u7f16\u7801\uff1a\u6253\u5f00\u8bbe\u7f6e\u83dc\u5355\uff0c\u641c\u7d22\u201c\u7f16\u7801\u201d\u3002\u5728\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9\u6240\u9700\u7f16\u7801\u3002\u91cd\u65b0\u6253\u5f00\u6587\u4ef6\u4ee5\u5e94\u7528\u65b0\u8bbe\u7f6e\u3002\u4e3a\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\uff0c\u5c06\u201c\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\u201d\u8bbe\u7f6e\u4e3a\u201c\u5f00\u201d\u3002\u53ef\u4ece\u72b6\u6001\u680f\u3001\u5feb\u6377\u952e\u6216\u547d\u4ee4\u9762\u677f\u66f4\u6539\u7f16\u7801\u3002 \u5982\u4f55\u66f4\u6539 VSCode \u7684\u7f16\u7801 Visual Studio Code\uff08VSCode\uff09\u662f\u4e00\u79cd\u6d41\u884c\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u5b83\u63d0\u4f9b\u4e86\u66f4\u6539\u6587\u4ef6\u7f16\u7801\u7684\u9009\u9879\uff0c\u4ee5\u4fbf\u5f00\u53d1\u8005\u4ee5\u4ed6\u4eec\u9009\u62e9\u7684\u683c\u5f0f\u67e5\u770b\u548c\u7f16\u8f91\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 VSCode \u4e2d\u66f4\u6539\u7f16\u7801\uff1a 1. \u6253\u5f00\u201c\u8bbe\u7f6e\u201d\u83dc\u5355 \u5728 Windows \u548c Linux \u4e0a\uff1a\u6309 Ctrl + , \u5728 macOS \u4e0a\uff1a\u6309 Cmd + , 2. \u641c\u7d22\u201c\u7f16\u7801\u201d \u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cencoding\u201d\u4ee5\u67e5\u627e\u4e0e\u7f16\u7801\u76f8\u5173\u7684\u8bbe\u7f6e\u3002 3. \u66f4\u6539\u201c\u6587\u4ef6\u7f16\u7801\u201d\u8bbe\u7f6e \u5728\u201c\u6587\u4ef6\u7f16\u7801\u201d\u4e0b\u62c9\u5217\u8868\u4e2d\uff0c\u9009\u62e9\u6240\u9700\u7684\u7f16\u7801\u3002\u5e38\u7528\u7684\u9009\u9879\u5305\u62ec\uff1a UTF-8 UTF-16LE UTF-16BE GBK Shift_JIS 4. \u91cd\u65b0\u6253\u5f00\u6587\u4ef6 \u66f4\u6539\u7f16\u7801\u540e\uff0c\u91cd\u65b0\u6253\u5f00\u6587\u4ef6\u4ee5\u5e94\u7528\u65b0\u7684\u8bbe\u7f6e\u3002 5. \u81ea\u52a8\u68c0\u6d4b\u7f16\u7801 VSCode \u8fd8\u63d0\u4f9b\u81ea\u52a8\u68c0\u6d4b\u6587\u4ef6\u7f16\u7801\u7684\u529f\u80fd\u3002\u8981\u542f\u7528\u6b64\u529f\u80fd\uff0c\u8bf7\u5728\u201c\u8bbe\u7f6e\u201d\u4e2d\u5c06\u201c\u7f16\u7801\u201d\u4e0b\u7684\u201c\u81ea\u52a8\u68c0\u6d4b\u7f16\u7801\u201d\u8bbe\u7f6e\u4e3a\u201c\u5f00\u201d\u3002 \u5176\u4ed6\u9009\u9879\uff1a \u4ece\u53f3\u4e0b\u89d2\u72b6\u6001\u680f\u66f4\u6539\u7f16\u7801\uff1a\u5f53\u6587\u4ef6\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u65f6\uff0c\u53ef\u4ee5\u5728\u53f3\u4e0b\u89d2\u7684\u72b6\u6001\u680f\u4e2d\u5355\u51fb\u7f16\u7801\u8bbe\u7f6e\u5e76\u9009\u62e9\u6240\u9700\u7684\u7f16\u7801\u3002 \u4f7f\u7528\u5feb\u6377\u952e\uff1a\u4f7f\u7528 Alt + E + C \u5feb\u6377\u952e\uff08Windows \u548c [&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-21374","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21374","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=21374"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21374\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}