{"id":1016940,"date":"2024-12-27T12:20:58","date_gmt":"2024-12-27T04:20:58","guid":{"rendered":""},"modified":"2024-12-27T12:21:02","modified_gmt":"2024-12-27T04:21:02","slug":"python%e5%a6%82%e4%bd%95%e8%bd%ac%e6%8d%a2%e4%b8%baunicode","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1016940.html","title":{"rendered":"python\u5982\u4f55\u8f6c\u6362\u4e3aunicode"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25100330\/403d4314-e9db-47ac-b023-c643cb8a3330.webp\" alt=\"python\u5982\u4f55\u8f6c\u6362\u4e3aunicode\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u8f6c\u6362\u4e3aUnicode\u7684\u65b9\u5f0f\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684Python\u7248\u672c\u3001\u4f7f\u7528<code>str.encode()<\/code>\u65b9\u6cd5\u3001\u4f7f\u7528<code>unicode()<\/code>\u51fd\u6570\uff08Python 2\u4e2d\uff09\u3001\u4f7f\u7528<code>bytes.decode()<\/code>\u65b9\u6cd5\uff08Python 3\u4e2d\uff09<\/strong>\u3002\u5728Python 3\u4e2d\uff0c\u6240\u6709\u7684\u5b57\u7b26\u4e32\u9ed8\u8ba4\u90fd\u662fUnicode\uff0c\u56e0\u6b64\u901a\u5e38\u4e0d\u9700\u8981\u7279\u522b\u7684\u8f6c\u6362\uff1b\u5728Python 2\u4e2d\uff0c\u9700\u8981\u6ce8\u610f\u5c06\u666e\u901a\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aUnicode\u3002\u4e3a\u4e86\u66f4\u8be6\u7ec6\u5730\u89e3\u91ca\u5176\u4e2d\u4e00\u70b9\uff0c\u6bd4\u5982\u5728Python 3\u4e2d\u4f7f\u7528<code>bytes.decode()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u5b57\u8282\u5e8f\u5217\u8f6c\u6362\u4e3aUnicode\u5b57\u7b26\u4e32\u3002<code>bytes.decode()<\/code>\u65b9\u6cd5\u7684\u4f7f\u7528\u9700\u8981\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\uff0c\u5982&#39;utf-8&#39;\uff0c\u786e\u4fdd\u5b57\u8282\u5e8f\u5217\u80fd\u591f\u6b63\u786e\u89e3\u7801\u4e3aUnicode\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001PYTHON 2\u4e0ePYTHON 3\u7684\u533a\u522b<\/p>\n<\/p>\n<p><p>\u5728Python 2\u4e2d\uff0c\u5b57\u7b26\u4e32\u4ee5\u5b57\u8282\u7684\u5f62\u5f0f\u5b58\u50a8\uff0c\u79f0\u4e3a<code>str<\/code>\u7c7b\u578b\uff0c\u800cUnicode\u5b57\u7b26\u4e32\u5219\u4f7f\u7528<code>unicode<\/code>\u7c7b\u578b\u3002\u5728Python 3\u4e2d\uff0c\u9ed8\u8ba4\u7684\u5b57\u7b26\u4e32\u7c7b\u578b\u662f<code>str<\/code>\uff0c\u5b83\u5df2\u7ecf\u662fUnicode\u683c\u5f0f\uff0c\u56e0\u6b64\u5728\u5904\u7406\u5b57\u7b26\u4e32\u65f6\u4e0d\u9700\u8981\u7279\u522b\u8f6c\u6362\u3002\u8fd9\u79cd\u5dee\u5f02\u662fPython 3\u5bf9Unicode\u7684\u5904\u7406\u66f4\u52a0\u7b80\u5316\u7684\u539f\u56e0\u4e4b\u4e00\u3002<\/p>\n<\/p>\n<p><p>Python 2\u4e2d\u7684\u5b57\u7b26\u4e32\u53ef\u4ee5\u901a\u8fc7<code>unicode()<\/code>\u51fd\u6570\u8f6c\u6362\u4e3aUnicode\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 2<\/p>\n<p>s = &#39;hello&#39;<\/p>\n<p>u = unicode(s, &#39;utf-8&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u800c\u5728Python 3\u4e2d\uff0c\u5b57\u7b26\u4e32\u5df2\u7ecf\u662fUnicode\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u8fd9\u4e2a\u8f6c\u6362\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 3<\/p>\n<p>s = &#39;hello&#39;  # already Unicode<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001USING STR.ENCODE() METHOD<\/p>\n<\/p>\n<p><p>\u5728Python 2\u4e2d\uff0c\u5982\u679c\u9700\u8981\u5c06Unicode\u5b57\u7b26\u4e32\u7f16\u7801\u4e3a\u5b57\u8282\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u4f7f\u7528<code>str.encode()<\/code>\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 2<\/p>\n<p>u = u&#39;hello&#39;<\/p>\n<p>s = u.encode(&#39;utf-8&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728Python 3\u4e2d\uff0c<code>str.encode()<\/code>\u65b9\u6cd5\u7528\u4e8e\u5c06Unicode\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u5b57\u7b26\u4e32\uff08<code>bytes<\/code>\u7c7b\u578b\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 3<\/p>\n<p>s = &#39;hello&#39;<\/p>\n<p>b = s.encode(&#39;utf-8&#39;)  # convert to bytes<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528<code>str.encode()<\/code>\u7684\u5173\u952e\u5728\u4e8e\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\uff0c\u5982<code>utf-8<\/code>\uff0c\u8fd9\u662f\u6700\u5e38\u7528\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u80fd\u591f\u5904\u7406\u5927\u591a\u6570\u8bed\u8a00\u7684\u5b57\u7b26\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001USING BYTES.DECODE() METHOD<\/p>\n<\/p>\n<p><p>\u5728Python 3\u4e2d\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u5b57\u8282\u5b57\u7b26\u4e32\uff08<code>bytes<\/code>\u7c7b\u578b\uff09\u5e76\u5e0c\u671b\u5c06\u5176\u8f6c\u6362\u4e3aUnicode\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u4f7f\u7528<code>bytes.decode()<\/code>\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 3<\/p>\n<p>b = b&#39;hello&#39;<\/p>\n<p>s = b.decode(&#39;utf-8&#39;)  # convert to str (Unicode)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>bytes.decode()<\/code>\u65b9\u6cd5\u7684\u53c2\u6570\u6307\u5b9a\u4e86\u7528\u4e8e\u89e3\u7801\u5b57\u8282\u5e8f\u5217\u7684\u7f16\u7801\u683c\u5f0f\u3002\u5e38\u7528\u7684\u7f16\u7801\u683c\u5f0f\u5305\u62ec<code>&#39;utf-8&#39;<\/code>\u3001<code>&#39;latin-1&#39;<\/code>\u7b49\u3002\u9009\u62e9\u5408\u9002\u7684\u7f16\u7801\u683c\u5f0f\u80fd\u591f\u786e\u4fdd\u5b57\u8282\u5e8f\u5217\u6b63\u786e\u8f6c\u6362\u4e3aUnicode\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001COMMON ENCODING FORMATS<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5b57\u7b26\u4e32\u7f16\u7801\u65f6\uff0c\u4e86\u89e3\u5e38\u7528\u7684\u7f16\u7801\u683c\u5f0f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u7f16\u7801\u683c\u5f0f\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>UTF-8<\/strong>\uff1a\u4e00\u79cd\u53ef\u53d8\u957f\u5ea6\u7684\u5b57\u7b26\u7f16\u7801\uff0c\u7528\u4e8e\u8868\u793aUnicode\u5b57\u7b26\u96c6\u4e2d\u7684\u6bcf\u4e00\u4e2a\u5b57\u7b26\u3002\u5b83\u662f\u4e92\u8054\u7f51\u4e0a\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u7f16\u7801\u683c\u5f0f\uff0c\u80fd\u591f\u8868\u793a\u51e0\u4e4e\u6240\u6709\u5df2\u77e5\u7684\u5b57\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>ASCII<\/strong>\uff1a\u4e00\u79cd\u5b57\u7b26\u7f16\u7801\u6807\u51c6\uff0c\u7528\u4e8e\u8868\u793a\u82f1\u8bed\u5b57\u7b26\u3002\u5b83\u53ea\u80fd\u8868\u793a128\u4e2a\u5b57\u7b26\uff0c\u56e0\u6b64\u4e0d\u9002\u7528\u4e8e\u975e\u82f1\u8bed\u8bed\u8a00\u7684\u5b57\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>ISO-8859-1\uff08Latin-1\uff09<\/strong>\uff1a\u4e00\u79cd\u5355\u5b57\u8282\u7f16\u7801\uff0c\u80fd\u591f\u8868\u793a\u897f\u6b27\u8bed\u8a00\u7684\u5b57\u7b26\u3002\u5b83\u662fASCII\u7684\u6269\u5c55\uff0c\u80fd\u591f\u8868\u793a256\u4e2a\u5b57\u7b26\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>UTF-16<\/strong>\uff1a\u4e00\u79cd\u56fa\u5b9a\u957f\u5ea6\u7684\u5b57\u7b26\u7f16\u7801\uff0c\u901a\u5e38\u7528\u4e8e\u8868\u793aUnicode\u5b57\u7b26\u96c6\u3002\u5b83\u4f7f\u7528\u4e24\u4e2a\u5b57\u8282\u8868\u793a\u4e00\u4e2a\u5b57\u7b26\uff0c\u9002\u7528\u4e8e\u9700\u8981\u8868\u793a\u5927\u91cf\u5b57\u7b26\u7684\u573a\u5408\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001HANDLING ENCODING ERRORS<\/p>\n<\/p>\n<p><p>\u5728\u5b57\u7b26\u4e32\u7f16\u7801\u548c\u89e3\u7801\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f16\u7801\u9519\u8bef\u3002\u8fd9\u4e9b\u9519\u8bef\u901a\u5e38\u662f\u7531\u4e8e\u5c1d\u8bd5\u4f7f\u7528\u4e0d\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\u89e3\u7801\u5b57\u8282\u5e8f\u5217\u6216\u7f16\u7801Unicode\u5b57\u7b26\u4e32\u65f6\u51fa\u73b0\u7684\u3002\u4e3a\u4e86\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\uff0c\u53ef\u4ee5\u4f7f\u7528<code>errors<\/code>\u53c2\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Python 3<\/p>\n<p>b = b&#39;\\xff&#39;  # invalid byte for utf-8<\/p>\n<p>try:<\/p>\n<p>    s = b.decode(&#39;utf-8&#39;)<\/p>\n<p>except UnicodeDecodeError:<\/p>\n<p>    s = b.decode(&#39;utf-8&#39;, errors=&#39;replace&#39;)  # replace invalid characters<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c<code>errors=&#39;replace&#39;<\/code>\u53c2\u6570\u4f1a\u7528\u66ff\u6362\u5b57\u7b26\uff08\u901a\u5e38\u662f&#39;\ufffd&#39;\uff09\u4ee3\u66ff\u65e0\u6cd5\u89e3\u7801\u7684\u5b57\u8282\u3002\u5176\u4ed6\u7684\u9519\u8bef\u5904\u7406\u7b56\u7565\u5305\u62ec<code>&#39;ignore&#39;<\/code>\uff0c\u5b83\u4f1a\u5ffd\u7565\u65e0\u6cd5\u89e3\u7801\u7684\u5b57\u8282\uff0c\u548c<code>&#39;strict&#39;<\/code>\uff0c\u5b83\u4f1a\u5728\u9047\u5230\u9519\u8bef\u65f6\u629b\u51fa\u5f02\u5e38\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001BEST PRACTICES FOR STRING HANDLING<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5b57\u7b26\u4e32\u548cUnicode\u65f6\uff0c\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u53ef\u4ee5\u5e2e\u52a9\u907f\u514d\u7f16\u7801\u9519\u8bef\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u660e\u786e\u7f16\u7801\u683c\u5f0f<\/strong>\uff1a\u5728\u7f16\u7801\u548c\u89e3\u7801\u5b57\u7b26\u4e32\u65f6\uff0c\u59cb\u7ec8\u660e\u786e\u6307\u5b9a\u7f16\u7801\u683c\u5f0f\uff0c\u907f\u514d\u4f7f\u7528\u7cfb\u7edf\u9ed8\u8ba4\u7684\u7f16\u7801\u683c\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Python 3<\/strong>\uff1aPython 3\u5bf9Unicode\u7684\u652f\u6301\u66f4\u597d\uff0c\u9ed8\u8ba4\u4f7f\u7528Unicode\u5b57\u7b26\u4e32\uff0c\u907f\u514d\u4e86\u8bb8\u591a\u7f16\u7801\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406\u5916\u90e8\u6570\u636e\u65f6\u5c0f\u5fc3<\/strong>\uff1a\u5728\u5904\u7406\u4ece\u5916\u90e8\u6e90\u83b7\u53d6\u7684\u6570\u636e\u65f6\uff0c\u59cb\u7ec8\u5047\u8bbe\u53ef\u80fd\u4f1a\u51fa\u73b0\u7f16\u7801\u9519\u8bef\uff0c\u5e76\u51c6\u5907\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6d4b\u8bd5\u7f16\u7801\u548c\u89e3\u7801\u6d41\u7a0b<\/strong>\uff1a\u5728\u5f00\u53d1\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u6d4b\u8bd5\u7f16\u7801\u548c\u89e3\u7801\u6d41\u7a0b\uff0c\u786e\u4fdd\u5904\u7406\u6240\u6709\u53ef\u80fd\u7684\u7f16\u7801\u60c5\u51b5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u6807\u51c6\u5e93<\/strong>\uff1aPython\u7684\u6807\u51c6\u5e93\u63d0\u4f9b\u4e86\u8bb8\u591a\u5904\u7406\u5b57\u7b26\u4e32\u548c\u7f16\u7801\u7684\u5de5\u5177\uff0c\u5145\u5206\u5229\u7528\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u7b80\u5316\u7f16\u7801\u5904\u7406\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u9075\u5faa\u8fd9\u4e9b\u5b9e\u8df5\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u5904\u7406\u5b57\u7b26\u4e32\u548cUnicode\u95ee\u9898\uff0c\u51cf\u5c11\u7f16\u7801\u9519\u8bef\uff0c\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aUnicode\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u9ed8\u8ba4\u5c31\u662fUnicode\u683c\u5f0f\u3002\u5728Python 3.x\u4e2d\uff0c\u6240\u6709\u5b57\u7b26\u4e32\u90fd\u662fUnicode\uff0c\u56e0\u6b64\u60a8\u53ea\u9700\u4f7f\u7528\u5b57\u7b26\u4e32\u5373\u53ef\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fPython 2.x\uff0c\u53ef\u4ee5\u4f7f\u7528<code>unicode()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aUnicode\u5bf9\u8c61\u3002\u4f8b\u5982\uff0c<code>unicode_string = unicode(&#39;\u60a8\u7684\u5b57\u7b26\u4e32&#39;, &#39;utf-8&#39;)<\/code>\u5c06\u628a\u4e00\u4e2aUTF-8\u7f16\u7801\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aUnicode\u5bf9\u8c61\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u975eASCII\u5b57\u7b26\u7684Unicode\u8f6c\u6362\uff1f<\/strong><br \/>\u5f53\u5904\u7406\u5305\u542b\u975eASCII\u5b57\u7b26\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u786e\u4fdd\u4f7f\u7528\u6b63\u786e\u7684\u7f16\u7801\u683c\u5f0f\u3002\u901a\u5e38\uff0cUTF-8\u662f\u6700\u5e38\u7528\u7684\u9009\u62e9\u3002\u5728Python 3\u4e2d\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5b57\u7b26\u4e32\uff0c\u65e0\u9700\u989d\u5916\u8f6c\u6362\u3002\u5728Python 2\u4e2d\uff0c\u8bf7\u786e\u4fdd\u5728\u8f6c\u6362\u65f6\u6307\u5b9a\u6b63\u786e\u7684\u7f16\u7801\uff0c\u4f8b\u5982\uff1a<code>unicode_string = unicode(&#39;\u542b\u6709\u7279\u6b8a\u5b57\u7b26\u7684\u5b57\u7b26\u4e32&#39;, &#39;utf-8&#39;)<\/code>\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5c06Unicode\u5bf9\u8c61\u8f6c\u6362\u56de\u5b57\u7b26\u4e32\uff1f<\/strong><br \/>\u8981\u5c06Unicode\u5bf9\u8c61\u8f6c\u6362\u56de\u5b57\u7b26\u4e32\uff0c\u53ef\u4ee5\u4f7f\u7528<code>encode()<\/code>\u65b9\u6cd5\u3002\u5728Python 3\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>str()<\/code>\u51fd\u6570\u5c06Unicode\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32\uff0c\u901a\u5e38\u4e3aUTF-8\u7f16\u7801\u3002\u4f8b\u5982\uff0c<code>string = unicode_string.encode(&#39;utf-8&#39;)<\/code>\u4f1a\u5c06Unicode\u5bf9\u8c61\u8f6c\u6362\u4e3aUTF-8\u7f16\u7801\u7684\u5b57\u8282\u5b57\u7b26\u4e32\u3002\u5728Python 2\u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528<code>unicode_string.encode(&#39;utf-8&#39;)<\/code>\u6765\u5b9e\u73b0\u540c\u6837\u7684\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u8f6c\u6362\u4e3aUnicode\u7684\u65b9\u5f0f\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684Python\u7248\u672c\u3001\u4f7f\u7528str.encode()\u65b9\u6cd5\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1016949,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1016940"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1016940"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1016940\/revisions"}],"predecessor-version":[{"id":1016950,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1016940\/revisions\/1016950"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1016949"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1016940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1016940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1016940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}