{"id":21034,"date":"2024-11-19T10:06:07","date_gmt":"2024-11-19T02:06:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21034\/"},"modified":"2024-11-19T10:06:07","modified_gmt":"2024-11-19T02:06:07","slug":"webstorm%e4%b9%b1%e7%a0%81%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21034\/","title":{"rendered":"webstorm\u4e71\u7801\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<blockquote><p>\n  \u8981\u89e3\u51b3 webstorm \u4e2d\u7684\u4e2d\u6587\u4e71\u7801\u95ee\u9898\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\uff1a1. \u8bbe\u7f6e\u6b63\u786e\u7684\u6587\u4ef6\u7f16\u7801\uff1b2. \u66f4\u6539\u9ed8\u8ba4\u7f16\u7801\uff1b3. \u91cd\u65b0\u6253\u5f00\u9879\u76ee\uff1b4. \u6e05\u9664\u7f13\u5b58\uff1b5. \u4f7f\u7528\u63d2\u4ef6\uff0c\u4f8b\u5982 cjk idea plugin\uff1b6. \u8054\u7cfb\u5b98\u65b9\u652f\u6301\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/08\/2024040817182530671.jpg\" class=\"aligncenter\" title=\"webstorm\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" alt=\"webstorm\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u89e3\u51b3 WebStorm \u4e2d\u7684\u4e2d\u6587\u4e71\u7801\u95ee\u9898<\/strong><\/p>\n<p>WebStorm \u662f\u4e00\u6b3e\u6d41\u884c\u7684 JavaScript \u96c6\u6210\u5f00\u53d1\u73af\u5883 (IDE)\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\u3002\u4f46\u662f\uff0c\u5f53\u7f16\u8f91\u4e2d\u6587\u6587\u4ef6\u65f6\uff0c\u6709\u65f6\u4f1a\u51fa\u73b0\u4e71\u7801\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff1a<\/p>\n<p><strong>1. \u8bbe\u7f6e\u6b63\u786e\u7684\u6587\u4ef6\u7f16\u7801<\/strong><\/p>\n<p>WebStorm \u9ed8\u8ba4\u4f7f\u7528 UTF-8 \u7f16\u7801\u3002\u5982\u679c\u60a8\u6b63\u5728\u7f16\u8f91\u975e UTF-8 \u7f16\u7801\u7684\u6587\u4ef6\uff08\u4f8b\u5982 GBK \u6216 Big5\uff09\uff0c\u9700\u8981\u624b\u52a8\u66f4\u65b0\u6587\u4ef6\u7f16\u7801\uff1a<\/p>\n<ul>\n<li>\u53f3\u952e\u5355\u51fb\u6587\u4ef6\u9009\u9879\u5361 -&gt; \u9009\u62e9 &#8220;Reopen with Encoding&#8221;<\/li>\n<li>\u4ece\u5217\u8868\u4e2d\u9009\u62e9\u6b63\u786e\u7684\u7f16\u7801 (\u4f8b\u5982 GBK)<\/li>\n<\/ul>\n<p><strong>2. \u66f4\u6539\u9ed8\u8ba4\u7f16\u7801<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u7ecf\u5e38\u7f16\u8f91\u7279\u5b9a\u7f16\u7801\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u5c06 WebStorm \u7684\u9ed8\u8ba4\u7f16\u7801\u66f4\u6539\u4e3a\u8be5\u7f16\u7801\uff1a<\/p>\n<ul>\n<li>\u6253\u5f00 &#8220;Settings&#8221; -&gt; &#8220;Editor&#8221; -&gt; &#8220;File Encodings&#8221;<\/li>\n<li>\u5728 &#8220;Default Encoding for Properties Files&#8221; \u4e0b\u62c9\u83dc\u5355\u4e2d\u9009\u62e9\u6b63\u786e\u7684\u7f16\u7801<\/li>\n<\/ul>\n<p><strong>3. \u91cd\u65b0\u6253\u5f00\u9879\u76ee<\/strong><\/p>\n<p>\u6709\u65f6\uff0c\u66f4\u6539\u7f16\u7801\u540e\uff0cWebStorm \u65e0\u6cd5\u7acb\u5373\u66f4\u65b0\u663e\u793a\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8bf7\u5c1d\u8bd5\u91cd\u65b0\u6253\u5f00\u9879\u76ee\uff1a<\/p>\n<ul>\n<li>\u5173\u95ed WebStorm<\/li>\n<li>\u91cd\u65b0\u6253\u5f00\u9879\u76ee<\/li>\n<\/ul>\n<p><strong>4. \u6e05\u9664\u7f13\u5b58<\/strong><\/p>\n<p>\u5982\u679c\u4e0a\u8ff0\u65b9\u6cd5\u90fd\u65e0\u6cd5\u89e3\u51b3\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u6e05\u9664 WebStorm \u7f13\u5b58\uff1a<\/p>\n<ul>\n<li>\u5173\u95ed WebStorm<\/li>\n<li>\u627e\u5230 WebStorm \u7f13\u5b58\u6587\u4ef6\u5939\uff08\u5177\u4f53\u4f4d\u7f6e\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\uff09<\/li>\n<li>\u5220\u9664\u7f13\u5b58\u6587\u4ef6\u5939\u4e2d\u7684\u6240\u6709\u6587\u4ef6<\/li>\n<\/ul>\n<p><strong>5. \u4f7f\u7528\u63d2\u4ef6<\/strong><\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u63d2\u4ef6\u6765\u5e2e\u52a9\u89e3\u51b3\u4e2d\u6587\u4e71\u7801\u95ee\u9898\uff1a<\/p>\n<ul>\n<li>[CJK IDEA Plugin](https:\/\/plugins.jetbrains.com\/plugin\/13434-cjk-idea)\uff1a\u8be5\u63d2\u4ef6\u6dfb\u52a0\u4e86\u5bf9 CJK\uff08\u4e2d\u65e5\u97e9\uff09\u8bed\u8a00\u66f4\u597d\u7684\u652f\u6301\uff0c\u5305\u62ec\u81ea\u52a8\u68c0\u6d4b\u6587\u4ef6\u7f16\u7801\u548c\u81ea\u52a8\u8f6c\u6362\u5b57\u7b26\u96c6\u3002<\/li>\n<\/ul>\n<p><strong>6. \u8054\u7cfb\u5b98\u65b9\u652f\u6301<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u5c1d\u8bd5\u4e86\u6240\u6709\u4e0a\u8ff0\u65b9\u6cd5\u540e\u4ecd\u7136\u9047\u5230\u95ee\u9898\uff0c\u53ef\u4ee5\u8054\u7cfb WebStorm \u5b98\u65b9\u652f\u6301\u56e2\u961f\u5bfb\u6c42\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e71\u7801\u600e\u4e48\u89e3\u51b3\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>\u8981\u89e3\u51b3 webstorm \u4e2d\u7684\u4e2d\u6587\u4e71\u7801\u95ee\u9898\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\uff1a1. \u8bbe\u7f6e\u6b63\u786e\u7684\u6587\u4ef6\u7f16\u7801\uff1b2. \u66f4\u6539\u9ed8\u8ba4\u7f16\u7801\uff1b3. \u91cd\u65b0\u6253\u5f00\u9879\u76ee\uff1b4. \u6e05\u9664\u7f13\u5b58\uff1b5. \u4f7f\u7528\u63d2\u4ef6\uff0c\u4f8b\u5982 cjk idea plugin\uff1b6. \u8054\u7cfb\u5b98\u65b9\u652f\u6301\u3002 \u5982\u4f55\u89e3\u51b3 WebStorm \u4e2d\u7684\u4e2d\u6587\u4e71\u7801\u95ee\u9898 WebStorm \u662f\u4e00\u6b3e\u6d41\u884c\u7684 JavaScript \u96c6\u6210\u5f00\u53d1\u73af\u5883 (IDE)\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\u3002\u4f46\u662f\uff0c\u5f53\u7f16\u8f91\u4e2d\u6587\u6587\u4ef6\u65f6\uff0c\u6709\u65f6\u4f1a\u51fa\u73b0\u4e71\u7801\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\uff1a 1. \u8bbe\u7f6e\u6b63\u786e\u7684\u6587\u4ef6\u7f16\u7801 WebStorm \u9ed8\u8ba4\u4f7f\u7528 UTF-8 \u7f16\u7801\u3002\u5982\u679c\u60a8\u6b63\u5728\u7f16\u8f91\u975e UTF-8 \u7f16\u7801\u7684\u6587\u4ef6\uff08\u4f8b\u5982 GBK \u6216 Big5\uff09\uff0c\u9700\u8981\u624b\u52a8\u66f4\u65b0\u6587\u4ef6\u7f16\u7801\uff1a \u53f3\u952e\u5355\u51fb\u6587\u4ef6\u9009\u9879\u5361 -&gt; \u9009\u62e9 &#8220;Reopen with Encoding&#8221; \u4ece\u5217\u8868\u4e2d\u9009\u62e9\u6b63\u786e\u7684\u7f16\u7801 (\u4f8b\u5982 GBK) 2. \u66f4\u6539\u9ed8\u8ba4\u7f16\u7801 \u5982\u679c\u60a8\u7ecf\u5e38\u7f16\u8f91\u7279\u5b9a\u7f16\u7801\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u5c06 WebStorm \u7684\u9ed8\u8ba4\u7f16\u7801\u66f4\u6539\u4e3a\u8be5\u7f16\u7801\uff1a \u6253\u5f00 &#8220;Settings&#8221; -&gt; &#8220;Editor&#8221; -&gt; &#8220;File Encodings&#8221; \u5728 &#8220;Default Encoding [&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-21034","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21034","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=21034"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21034\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}