{"id":204581,"date":"2025-05-29T10:52:41","date_gmt":"2025-05-29T02:52:41","guid":{"rendered":"https:\/\/server.hk\/cnblog\/204581\/"},"modified":"2025-05-29T10:52:41","modified_gmt":"2025-05-29T02:52:41","slug":"geany-%e4%b8%ad%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81%ef%bc%9a%e4%b8%ba%e4%bb%80%e4%b9%88-utf-8-%e7%bc%96%e7%a0%81%e5%90%8e%e4%b8%ad%e6%96%87%e4%bb%8d%e6%97%a0%e6%b3%95%e6%ad%a3%e5%b8%b8%e6%98%be","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/204581\/","title":{"rendered":"Geany \u4e2d\u4e2d\u6587\u4e71\u7801\uff1a\u4e3a\u4ec0\u4e48 UTF-8 \u7f16\u7801\u540e\u4e2d\u6587\u4ecd\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>Geany \u4e2d\u4e2d\u6587\u4e71\u7801\uff1a\u4e3a\u4ec0\u4e48 UTF-8 \u7f16\u7801\u540e\u4e2d\u6587\u4ecd\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\uff1f<\/h1>\n<p>\u600e\u4e48\u5165\u95e8\u6587\u7ae0\u7f16\u7a0b\uff1f\u9700\u8981\u5b66\u4e60\u54ea\u4e9b\u77e5\u8bc6\u70b9\uff1f\u8fd9\u662f\u65b0\u624b\u4eec\u521a\u63a5\u89e6\u7f16\u7a0b\u65f6\u5e38\u89c1\u7684\u95ee\u9898\uff1b\u4e0b\u9762\u5c31\u6765\u7ed9\u5927\u5bb6\u6574\u7406\u5206\u4eab\u4e00\u4e9b\u77e5\u8bc6\u70b9\uff0c\u5e0c\u671b\u80fd\u591f\u7ed9\u521d\u5b66\u8005\u4e00\u4e9b\u5e2e\u52a9\u3002\u672c\u7bc7\u6587\u7ae0\u5c31\u6765\u4ecb\u7ecd\u300aGeany \u4e2d\u4e2d\u6587\u4e71\u7801\uff1a\u4e3a\u4ec0\u4e48 UTF-8 \u7f16\u7801\u540e\u4e2d\u6587\u4ecd\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\uff1f\u300b\uff0c\u6d89\u53ca\u5230\uff0c\u6709\u9700\u8981\u7684\u53ef\u4ee5\u6536\u85cf\u4e00\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241111\/17312909876731676bf0761.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>Geany \u4e2d\u4e71\u7801\u6210\u56e0\u53ca\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u4e3a\u4f55\u5728 Geany \u4e2d\u4f7f\u7528 UTF-8 \u7f16\u7801\u540e\uff0c\u4e2d\u6587\u4ecd\u4f1a\u51fa\u73b0\u4e71\u7801\uff1f\u8fd9\u4e2a\u95ee\u9898\u56f0\u6270\u4e86\u4e0d\u5c11 Python \u7231\u597d\u8005\u3002\u7136\u800c\uff0c\u4ee4\u4eba\u7591\u60d1\u7684\u662f\uff0c\u5728 IDLE \u548c\u7ec8\u7aef\u4e2d\uff0c\u4e2d\u6587\u5374\u80fd\u6b63\u5e38\u663e\u793a\u3002<\/p>\n<p>\u95ee\u9898\u7684\u6839\u6e90\u5728\u4e8e Geany \u7684\u5185\u90e8\u63a7\u5236\u53f0\u53ef\u80fd\u9ed8\u8ba4\u4f7f\u7528 cmd\uff0c\u5176\u9ed8\u8ba4\u7f16\u7801\u4e3a GBK\u3002\u8981\u89e3\u51b3\u4e71\u7801\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<ol>\n<li><strong>\u4fee\u6539\u7f16\u7801\uff1a<\/strong>\u5728 Geany \u7684\u8bbe\u7f6e\u4e2d\uff0c\u5c06\u63a7\u5236\u53f0\u7684\u7f16\u7801\u66f4\u6539\u4e3a GBK\u3002<\/li>\n<li><strong>\u66f4\u6362\u5b57\u4f53\uff1a<\/strong>\u5c1d\u8bd5\u66f4\u6362\u4e00\u79cd\u652f\u6301\u4e2d\u6587\u7684\u5b57\u4f53\uff0c\u4f8b\u5982\u5fae\u8f6f\u96c5\u9ed1\u3001\u5b8b\u4f53\u7b49\u3002<\/li>\n<li><strong>\u5176\u4ed6\u53ef\u80fd\u6027\uff1a<\/strong>\u53ef\u80fd\u662f\u5b57\u4f53\u4e0d\u652f\u6301\u4e2d\u6587\u6216\u5176\u4ed6\u672a\u77e5\u539f\u56e0\u9020\u6210\u7684\u3002<\/li>\n<\/ol>\n<p>\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u5982\u679c\u53ea\u60f3\u7f16\u5199 Python \u4ee3\u7801\uff0c\u5efa\u8bae\u4f7f\u7528 PyCharm \u6216 VSCode \u7b49\u4e13\u4e1a\u7684 Python \u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u5b83\u4eec\u80fd\u66f4\u597d\u5730\u5904\u7406\u4e2d\u6587\u7f16\u7801\u95ee\u9898\u3002<\/p>\n<p>\u7406\u8bba\u8981\u638c\u63e1\uff0c\u5b9e\u64cd\u4e0d\u80fd\u843d\uff01\u4ee5\u4e0a\u5173\u4e8e\u300aGeany \u4e2d\u4e2d\u6587\u4e71\u7801\uff1a\u4e3a\u4ec0\u4e48 UTF-8 \u7f16\u7801\u540e\u4e2d\u6587\u4ecd\u65e0\u6cd5\u6b63\u5e38\u663e\u793a\uff1f\u300b\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5927\u5bb6\u90fd\u638c\u63e1\u4e86\u5427\uff01\u5982\u679c\u60f3\u8981\u7ee7\u7eed\u63d0\u5347\u81ea\u5df1\u7684\u80fd\u529b\uff0c\u90a3\u4e48\u5c31\u6765\u5173\u6ce8\u516c\u4f17\u53f7\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Geany \u4e2d\u4e2d\u6587\u4e71\u7801\uff1a\u4e3a\u4ec0\u4e48 &#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-204581","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=204581"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/204581\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=204581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=204581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=204581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}