{"id":984017,"date":"2024-12-27T07:24:23","date_gmt":"2024-12-26T23:24:23","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/984017.html"},"modified":"2024-12-27T07:24:28","modified_gmt":"2024-12-26T23:24:28","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8b%e5%ad%97%e7%ac%a6%e7%bc%96%e7%a0%81python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/984017.html","title":{"rendered":"\u5982\u4f55\u67e5\u770b\u5b57\u7b26\u7f16\u7801python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211821\/11ddda75-f971-404d-8cdc-c3e0ba888da1.webp\" alt=\"\u5982\u4f55\u67e5\u770b\u5b57\u7b26\u7f16\u7801python\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u67e5\u770b\u5b57\u7b26\u7f16\u7801\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5982\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u9ed8\u8ba4\u7f16\u7801\u3001\u901a\u8fc7\u6587\u4ef6\u5bf9\u8c61\u7684<code>encoding<\/code>\u5c5e\u6027\u67e5\u770b\u6587\u4ef6\u7f16\u7801\u3001\u4f7f\u7528<code>chardet<\/code>\u5e93\u68c0\u6d4b\u672a\u77e5\u6587\u672c\u7f16\u7801\u7b49\u3002\u8fd9\u91cc\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u67e5\u770b\u5b57\u7b26\u7f16\u7801\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u9ed8\u8ba4\u7f16\u7801<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7684\u9ed8\u8ba4\u5b57\u7b26\u7f16\u7801\u3002\u9ed8\u8ba4\u7f16\u7801\u901a\u5e38\u662fUTF-8\uff0c\u4f46\u8fd9\u53ef\u80fd\u4f1a\u6839\u636e\u7cfb\u7edf\u914d\u7f6e\u800c\u6709\u6240\u4e0d\u540c\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u9ed8\u8ba4\u5b57\u7b26\u7f16\u7801\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import sys<\/p>\n<p>def get_default_encoding():<\/p>\n<p>    return sys.getdefaultencoding()<\/p>\n<p>print(&quot;Default encoding:&quot;, get_default_encoding())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>sys.getdefaultencoding()<\/code>\u51fd\u6570\u8fd4\u56dePython\u89e3\u91ca\u5668\u7684\u9ed8\u8ba4\u5b57\u7b26\u7f16\u7801\u3002\u4e86\u89e3\u9ed8\u8ba4\u7f16\u7801\u975e\u5e38\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u5f71\u54cd\u5230\u5b57\u7b26\u4e32\u7684\u5904\u7406\u548c\u6587\u4ef6\u7684\u8bfb\u53d6\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u67e5\u770b\u6587\u4ef6\u5bf9\u8c61\u7684\u7f16\u7801\u5c5e\u6027<\/p>\n<\/p>\n<p><p>\u5f53\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u5bf9\u8c61\u7684<code>encoding<\/code>\u5c5e\u6027\u6765\u67e5\u770b\u6587\u4ef6\u7684\u7f16\u7801\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u67e5\u770b\u6587\u4ef6\u7f16\u7801\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def check_file_encoding(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as f:<\/p>\n<p>        print(f&quot;File encoding: {f.encoding}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\uff1acheck_file_encoding(&#39;example.txt&#39;)<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6587\u4ef6\u5bf9\u8c61\u7684<code>encoding<\/code>\u5c5e\u6027\u663e\u793a\u7528\u4e8e\u8bfb\u53d6\u6216\u5199\u5165\u6587\u4ef6\u7684\u5b57\u7b26\u7f16\u7801\u3002\u5982\u679c\u672a\u663e\u5f0f\u6307\u5b9a\u7f16\u7801\uff0cPython\u5c06\u4f7f\u7528\u9ed8\u8ba4\u7f16\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528<code>chardet<\/code>\u5e93\u68c0\u6d4b\u672a\u77e5\u6587\u672c\u7f16\u7801<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u672a\u77e5\u7f16\u7801\u7684\u6587\u672c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>chardet<\/code>\u5e93\u6765\u68c0\u6d4b\u5176\u5b57\u7b26\u7f16\u7801\u3002<code>chardet<\/code>\u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u7b2c\u4e09\u65b9\u5e93\uff0c\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u6587\u672c\u7684\u7f16\u7801\u683c\u5f0f\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528<code>chardet<\/code>\u6765\u68c0\u6d4b\u6587\u4ef6\u7f16\u7801\u7684\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import chardet<\/p>\n<p>def detect_encoding(file_path):<\/p>\n<p>    with open(file_path, &#39;rb&#39;) as f:<\/p>\n<p>        data = f.read()<\/p>\n<p>        result = chardet.detect(data)<\/p>\n<p>        encoding = result[&#39;encoding&#39;]<\/p>\n<p>        print(f&quot;Detected encoding: {encoding}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\uff1adetect_encoding(&#39;unknown_encoding.txt&#39;)<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>chardet.detect()<\/code>\u51fd\u6570\u8fd4\u56de\u4e00\u4e2a\u5b57\u5178\uff0c\u5176\u4e2d\u5305\u542b\u68c0\u6d4b\u5230\u7684\u7f16\u7801\u548c\u7f6e\u4fe1\u5ea6\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u672a\u77e5\u7f16\u7801\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528<code>unicode<\/code>\u548c<code>str<\/code>\u5bf9\u8c61\u7684\u7f16\u7801\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>\u5728Python 3\u4e2d\uff0c\u5b57\u7b26\u4e32\u662f<code>str<\/code>\u5bf9\u8c61\uff0c\u9ed8\u8ba4\u4f7f\u7528Unicode\u7f16\u7801\u3002\u7136\u800c\uff0c\u5728\u5904\u7406\u9700\u8981\u7279\u5b9a\u7f16\u7801\u7684\u5b57\u7b26\u4e32\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684<code>encode()<\/code>\u548c<code>decode()<\/code>\u65b9\u6cd5\u3002\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u5728\u4e0d\u540c\u7f16\u7801\u4e4b\u95f4\u8fdb\u884c\u8f6c\u6362\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def convert_string_encoding(input_string, from_encoding, to_encoding):<\/p>\n<p>    bytes_string = input_string.encode(from_encoding)<\/p>\n<p>    converted_string = bytes_string.decode(to_encoding)<\/p>\n<p>    return converted_string<\/p>\n<h2><strong>\u793a\u4f8b\uff1aconvert_string_encoding(&#39;\u4f60\u597d&#39;, &#39;utf-8&#39;, &#39;ascii&#39;)<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8f6c\u6362\u7f16\u7801\u65f6\uff0c\u786e\u4fdd\u76ee\u6807\u7f16\u7801\u80fd\u591f\u8868\u793a\u6240\u6709\u5b57\u7b26\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u5bfc\u81f4<code>UnicodeDecodeError<\/code>\u6216\u6570\u636e\u4e22\u5931\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5e38\u89c1\u5b57\u7b26\u7f16\u7801\u4ecb\u7ecd<\/p>\n<\/p>\n<p><p>\u4e86\u89e3\u5e38\u89c1\u7684\u5b57\u7b26\u7f16\u7801\u6709\u52a9\u4e8e\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d\u6b63\u786e\u5904\u7406\u6587\u672c\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u5b57\u7b26\u7f16\u7801\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>UTF-8<\/strong>\uff1a\u4e00\u79cd\u53ef\u53d8\u957f\u5ea6\u7684\u7f16\u7801\uff0c\u51e0\u4e4e\u53ef\u4ee5\u8868\u793a\u6240\u6709\u4e66\u5199\u7cfb\u7edf\u7684\u5b57\u7b26\uff0c\u662f\u4e92\u8054\u7f51\u7684\u6807\u51c6\u5b57\u7b26\u7f16\u7801\u3002<\/li>\n<li><strong>ASCII<\/strong>\uff1a\u4e00\u79cd7\u4f4d\u7f16\u7801\uff0c\u4e3b\u8981\u7528\u4e8e\u8868\u793a\u82f1\u8bed\u5b57\u7b26\uff0c\u662f\u6700\u57fa\u672c\u7684\u5b57\u7b26\u7f16\u7801\u3002<\/li>\n<li><strong>ISO-8859-1<\/strong>\uff08Latin-1\uff09\uff1a\u4e00\u79cd8\u4f4d\u7f16\u7801\uff0c\u6269\u5c55\u4e86ASCII\uff0c\u4e3b\u8981\u7528\u4e8e\u897f\u6b27\u8bed\u8a00\u3002<\/li>\n<li><strong>UTF-16<\/strong>\uff1a\u4e00\u79cd16\u4f4d\u7f16\u7801\uff0c\u5e38\u7528\u4e8eWindows\u548cJava\u73af\u5883\u3002<\/li>\n<li><strong>UTF-32<\/strong>\uff1a\u4e00\u79cd\u56fa\u5b9a\u957f\u5ea6\u7684\u7f16\u7801\uff0c\u4f7f\u752832\u4f4d\u8868\u793a\u5b57\u7b26\uff0c\u4e3b\u8981\u7528\u4e8e\u9700\u8981\u5904\u7406\u5927\u91cf\u5b57\u7b26\u7684\u60c5\u51b5\u3002<\/li>\n<\/ul>\n<p><p>\u516d\u3001\u5904\u7406\u7f16\u7801\u9519\u8bef<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u7f16\u7801\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f16\u7801\u9519\u8bef\uff0c\u5982<code>UnicodeEncodeError<\/code>\u6216<code>UnicodeDecodeError<\/code>\u3002Python\u63d0\u4f9b\u4e86\u591a\u79cd\u5904\u7406\u7f16\u7801\u9519\u8bef\u7684\u65b9\u6cd5\uff0c\u5982\u5ffd\u7565\u9519\u8bef\u3001\u66ff\u6362\u5b57\u7b26\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def handle_encoding_error(input_string, encoding):<\/p>\n<p>    try:<\/p>\n<p>        encoded_string = input_string.encode(encoding, errors=&#39;ignore&#39;)<\/p>\n<p>        decoded_string = encoded_string.decode(encoding)<\/p>\n<p>        return decoded_string<\/p>\n<p>    except UnicodeError as e:<\/p>\n<p>        print(f&quot;Encoding error: {e}&quot;)<\/p>\n<h2><strong>\u793a\u4f8b\uff1ahandle_encoding_error(&#39;\u4f60\u597d&#39;, &#39;ascii&#39;)<\/strong><\/h2>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u6307\u5b9a<code>errors<\/code>\u53c2\u6570\uff0c\u53ef\u4ee5\u63a7\u5236\u7f16\u7801\u9519\u8bef\u7684\u5904\u7406\u65b9\u5f0f\u3002\u5e38\u7528\u7684\u9009\u9879\u5305\u62ec<code>&#39;ignore&#39;<\/code>\uff08\u5ffd\u7565\u9519\u8bef\uff09\u3001<code>&#39;replace&#39;<\/code>\uff08\u7528\u66ff\u4ee3\u5b57\u7b26\u66ff\u6362\u9519\u8bef\uff09\u548c<code>&#39;strict&#39;<\/code>\uff08\u9ed8\u8ba4\uff0c\u629b\u51fa\u9519\u8bef\uff09\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u4e86\u89e3\u5982\u4f55\u67e5\u770b\u548c\u5904\u7406\u5b57\u7b26\u7f16\u7801\u662f\u5904\u7406\u6587\u672c\u6570\u636e\u7684\u91cd\u8981\u6280\u80fd\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7<code>sys<\/code>\u6a21\u5757\u67e5\u770b\u9ed8\u8ba4\u7f16\u7801\u3001\u901a\u8fc7\u6587\u4ef6\u5bf9\u8c61\u67e5\u770b\u6587\u4ef6\u7f16\u7801\u3001\u4f7f\u7528<code>chardet<\/code>\u5e93\u68c0\u6d4b\u672a\u77e5\u7f16\u7801\u4ee5\u53ca\u4f7f\u7528\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684\u65b9\u6cd5\u5728\u4e0d\u540c\u7f16\u7801\u4e4b\u95f4\u8f6c\u6362\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u5de7\u6709\u52a9\u4e8e\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u6b63\u786e\u5904\u7406\u548c\u8f6c\u6362\u6587\u672c\u6570\u636e\uff0c\u907f\u514d\u7f16\u7801\u9519\u8bef\u5bfc\u81f4\u7684\u6570\u636e\u4e22\u5931\u6216\u7a0b\u5e8f\u5d29\u6e83\u3002\u901a\u8fc7\u719f\u6089\u5e38\u89c1\u5b57\u7b26\u7f16\u7801\u548c\u5904\u7406\u7f16\u7801\u9519\u8bef\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u6587\u672c\u6570\u636e\u5904\u7406\u7684\u53ef\u9760\u6027\u548c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u68c0\u6d4b\u6587\u672c\u6587\u4ef6\u7684\u5b57\u7b26\u7f16\u7801\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>chardet<\/code>\u5e93\u6765\u68c0\u6d4b\u6587\u672c\u6587\u4ef6\u7684\u5b57\u7b26\u7f16\u7801\u3002\u9996\u5148\uff0c\u5b89\u88c5\u8be5\u5e93\uff1a<code>pip install chardet<\/code>\u3002\u63a5\u7740\uff0c\u6253\u5f00\u6587\u4ef6\u5e76\u8bfb\u53d6\u5176\u5185\u5bb9\uff0c\u4f7f\u7528<code>chardet.detect()<\/code>\u65b9\u6cd5\u6765\u83b7\u53d6\u7f16\u7801\u4fe1\u606f\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import chardet\n\nwith open(&#39;yourfile.txt&#39;, &#39;rb&#39;) as f:\n    raw_data = f.read()\n    result = chardet.detect(raw_data)\n    print(result[&#39;encoding&#39;])\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u83b7\u53d6\u5230\u6587\u4ef6\u7684\u4e3b\u8981\u5b57\u7b26\u7f16\u7801\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u8f6c\u6362\u5b57\u7b26\u7f16\u7801\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u8f6c\u6362\u5b57\u7b26\u7f16\u7801\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684<code>str.encode()<\/code>\u548c<code>bytes.decode()<\/code>\u65b9\u6cd5\u3002\u4f8b\u5982\uff0c\u5c06UTF-8\u7f16\u7801\u7684\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3aGBK\u7f16\u7801\uff0c\u53ef\u4ee5\u5148\u5c06\u5b57\u7b26\u4e32\u7f16\u7801\u4e3a\u5b57\u8282\uff0c\u7136\u540e\u518d\u89e3\u7801\u4e3a\u9700\u8981\u7684\u7f16\u7801\u683c\u5f0f\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">original_str = &quot;\u4f60\u597d&quot;\nencoded_bytes = original_str.encode(&#39;utf-8&#39;)  # \u8f6c\u4e3a\u5b57\u8282\nconverted_str = encoded_bytes.decode(&#39;gbk&#39;, errors=&#39;ignore&#39;)  # \u89e3\u7801\u4e3aGBK\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u786e\u4fdd\u4e86\u7f16\u7801\u8f6c\u6362\u7684\u7075\u6d3b\u6027\u3002<\/p>\n<p><strong>\u5982\u4f55\u68c0\u67e5Python\u5b57\u7b26\u4e32\u7684\u5f53\u524d\u7f16\u7801\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u662f\u4ee5Unicode\u683c\u5f0f\u5b58\u50a8\u7684\uff0c\u56e0\u6b64\u5e76\u4e0d\u76f4\u63a5\u5173\u8054\u4e8e\u7279\u5b9a\u7684\u5b57\u7b26\u7f16\u7801\u3002\u8981\u68c0\u67e5\u4e00\u4e2a\u5b57\u7b26\u4e32\u7684\u7f16\u7801\uff0c\u901a\u5e38\u9700\u8981\u5148\u5c06\u5176\u7f16\u7801\u4e3a\u5b57\u8282\uff0c\u7136\u540e\u518d\u67e5\u770b\u5b57\u8282\u7684\u7f16\u7801\u65b9\u5f0f\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>type()<\/code>\u51fd\u6570\u6765\u786e\u8ba4\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684\u7c7b\u578b\uff0c\u4f46\u5bf9\u4e8e\u7f16\u7801\u4fe1\u606f\uff0c\u9700\u8981\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u5e76\u4f7f\u7528\u76f8\u5e94\u7684\u7f16\u7801\u8fdb\u884c\u67e5\u770b\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">my_str = &quot;Hello&quot;\nencoded_bytes = my_str.encode(&#39;utf-8&#39;)\nprint(type(encoded_bytes))  # \u8f93\u51fa &lt;class &#39;bytes&#39;&gt;\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7406\u89e3\u5b57\u7b26\u4e32\u5728\u4e0d\u540c\u7f16\u7801\u4e0b\u7684\u8868\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u67e5\u770b\u5b57\u7b26\u7f16\u7801\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5982\u4f7f\u7528sys\u6a21\u5757\u67e5\u770b\u9ed8\u8ba4\u7f16\u7801\u3001\u901a\u8fc7\u6587\u4ef6\u5bf9\u8c61\u7684encoding [&hellip;]","protected":false},"author":3,"featured_media":984032,"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\/984017"}],"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=984017"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984017\/revisions"}],"predecessor-version":[{"id":984033,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/984017\/revisions\/984033"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/984032"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=984017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=984017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=984017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}