{"id":260,"date":"2019-01-10T02:59:42","date_gmt":"2019-01-10T02:59:42","guid":{"rendered":""},"modified":"2020-10-01T01:59:04","modified_gmt":"2020-09-30T17:59:04","slug":"python3%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8chr%e6%8a%8a%e4%b8%80%e4%b8%aa%e5%a4%a7%e4%ba%8e128%e6%95%b0%e5%ad%97%e8%bd%ac%e4%b8%baascii%e7%9a%84bytes%e7%b1%bb%e5%9e%8b","status":"publish","type":"post","link":"http:\/\/weizn.net\/?p=260","title":{"rendered":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b"},"content":{"rendered":"<p><span style=\"line-height: 1; font-size: 14px;\">\u539f\u6587\uff1a<\/span><span style=\"line-height: 1;\"><a href=\"https:\/\/www.oschina.net\/question\/2741863_2199513\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-size: 14px;\">https:\/\/www.oschina.net\/question\/2741863_2199513<\/span><\/a><\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u95ee\uff1a<\/span><br \/>\n<span style=\"font-size: 14px;\">\u5728 num&lt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#8216;utf-8&#8217;)\u5f97\u5230\u7684\u662f\u4e00\u4e2a\u5b57\u7b26\u7684ascii\u5341\u516d\u8fdb\u5236<\/span><br \/>\n<span style=\"font-size: 14px;\">\u4f46\u662f\u5728num&gt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#8216;utf-8&#8217;)\u5f97\u5230\u7684\u662f\u4e24\u4e2a\u5b57\u8282\u7684ascii\u5341\u516d\u8fdb\u5236\uff0c\u8bf7\u95ee\u8be5\u5982\u4f55\u8f6c\u6362\uff0c\u6211\u80fd\u591f\u5f97\u5230\u4e00\u4e2a\u5b57\u8282\u7684\u5341\u516d\u8fdb\u5236\uff1f\uff1f<\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u7b54\uff1a<\/span><br \/>\n<span style=\"font-size: 14px;\">\u8fd9\u662f\u4e00\u4e2a\u5f88\u6709\u610f\u601d\u7684\u95ee\u9898\uff0c\u8ba9\u6211\u6765\u4ece\u5934\u8bb2\u8d77\u3002<\/span><br \/>\n<span style=\"font-size: 14px;\">\u9996\u5148\uff0c\u6211\u4eec\u770b\u770bhelp(chr)\uff0c\u53ef\u4ee5\u77e5\u9053Return a Unicode string of one character with ordinal i; 0 &lt;= i &lt;= 0x10ffff. \u6240\u4ee5chr(i)\u51fd\u6570\u5b9e\u9645\u4e0a\u8fd4\u56de\u7684\u662fUnicode\u7f16\u7801\u8868\u4e2d\u7684\u4e00\u4e2a\u5b57\u7b26\uff0c\u53c2\u6570i\u6307\u5b9a\u4e86\u8fd9\u4e2a\u5b57\u7b26\u5728Unicdoe\u7f16\u7801\u8868\u4e2d\u7684\u4f4d\u7f6e\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">PS1\uff1aUnicode\u7f16\u7801\u8868\u662f\u4e00\u4e2a\u5168\u7403\u7edf\u4e00\u7684\u6807\u51c6\uff0c\u6211\u4eec\u53ef\u4ee5\u8ba4\u4e3a\u5b83\u4e3a\u4e16\u754c\u4e0a\u6240\u6709\u7684\u5b57\u7b26\uff08\u8fd8\u6709\u4e00\u4e9bglyph\u3001\u8868\u60c5\u4e4b\u7c7b\u7684\uff09\u90fd\u7f16\u4e86\u53f7\u3002\u800c\u5176\u4ed6\u4e00\u4e9b\u7f16\u7801\uff0c\u6bd4\u5982ASCII\u3001GBK\u3001cp1252\u7b49\u7f16\u7801\uff0c\u5219\u53ea\u7f16\u7801\u4e86Unicode\u7f16\u7801\u8868\u4e2d\u7684\u4e00\u90e8\u5206\u5b57\u7b26\u3002\u5f53\u7136\u8fd8\u6709utf-8\u548cuft-16\u7b49\u7f16\u7801\u5219\u662f\u91c7\u7528\u4e0d\u540c\u7684\u65b9\u5f0f\u7f16\u7801\u4e86\u6240\u6709\u7684Unicode\u5b57\u7b26\u3002\u76ee\u524dUnicode\u5df2\u7ecf\u53d1\u5e03\u5230\u4e86\u7b2c9\u7248\uff0cPython 3\u5185\u90e8\u91c7\u7528Unicode\u8868\u793a\u6240\u6709\u5b57\u7b26\uff0c\u5373str\u7c7b\u578b\uff0c\u800c\u7f16\u7801\u6210\u5176\u4ed6\u7f16\u7801\u683c\u5f0f\u540e\uff0c\u5219\u662fBytes\u7c7b\u578b\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">ASCII\u7f16\u7801\u4e2d\u6bcf\u4e2a\u5b57\u7b26\u7f16\u7801\u662f1\u4e2aByte\uff0c\u4e14\u53ea\u67090-127\uff0c\u800c128\uff0d255\u90e8\u5206\u7684\u7f16\u7801\u5c5e\u4e8eExtended ASCII\u3002Python\u9ed8\u8ba4\u7684ASCII\u4e2d\u662f\u6ca1\u6709\u5927\u4e8e127\u90e8\u5206\u7684\uff0c\u5982\u679c\u6267\u884c\uff1achr(128).encode(&#8216;ascii&#8217;)\uff0c\u4f1a\u5f97\u5230\u5f02\u5e38&#8217;ascii&#8217; codec can&#8217;t encode character &#8216;\\x80&#8217; in position 0: ordinal not in range(128)<\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u800cutf-8\u7f16\u7801\u867d\u7136\u652f\u6301\u6240\u6709\u7684Unicode\u5b57\u7b26\uff0c\u4f46\u6839\u636e\u5b57\u7b26\u7684\u4e0d\u540c\uff0c\u4f1a\u91c7\u75281~3\u4e2aByte\u6765\u7f16\u7801\u5b57\u7b26\u3002\u5b83\u5bf9\u4e8eASCII\u7f16\u7801\u662f\u517c\u5bb9\u7684\uff0c\u6240\u4ee50~127\u7684\u90e8\u5206\u548cutf-8\u548cascii\u7684\u7f16\u7801\u662f\u4e00\u6837\u7684\u3002\u4f46\u662f\u5927\u4e8e128\u7684\u90a3\u90e8\u5206extended ascii\u4e2d\u7684\u5b57\u7b26\uff0c\u5219\u91c7\u7528\u4e86\u4e24\u4e2a\u5b57\u8282\u8fdb\u884c\u7f16\u7801\uff0c\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48\u4f60\u7684\u4ee3\u7801\u5f97\u5230\u4e86\u4e24\u4e2aBytes\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u6211\u731c\u4f60\u9700\u8981\u7684\u662f\u4e00\u4e2a\u652f\u6301Extended ASCII\u90e8\u5206\u5b57\u7b26\uff0c\u4e14\u91c7\u75281\u4e2aByte\u56fa\u5b9a\u5927\u5c0f\u7f16\u7801\u7684encoding\uff0c\u6bd4\u5982ISO 8859-1\uff0c\u4e5f\u88ab\u79f0\u4e3alatin1\u3002<\/span><br \/>\n<span style=\"font-size: 14px;\">\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u6bd4\u5982\u4eba\u6c11\u5e01\u94b1\u591a\u7b26\u53f7\u00a5\u5728Unicode\u4e2d\u7684\u4f4d\u7f6e\u662f165\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">&gt;&gt;&gt; chr(165)<\/span><br \/>\n<span style=\"font-size: 14px;\">\u00a5<\/span><br \/>\n<span style=\"font-size: 14px;\">&gt;&gt;&gt; chr(165).encode(&#8216;latin1&#8217;)<\/span><br \/>\n<span style=\"font-size: 14px;\">b&#8217;\\xa5&#8242;<\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u5176\u4ed6\u7684\u7f16\u7801\u6bd4\u5982cp437\u3001cp1252\uff0c\u4e5f\u53ef\u4ee5\u7f16\u7801128-255\u4e2d\u7684\u90e8\u5206\u5b57\u7b26\uff0c\u6bd4\u5982 chr(165).encode(&#8216;cp437&#8217;)\u8fd4\u56deb&#8217;\\x9d&#8217;\uff0c\u6bd4\u5982 chr(165).encode(&#8216;cp1252&#8217;)\u8fd4\u56deb&#8217;\\xa5&#8217;\u3002\u4f46\u5982\u679c\u7f16\u7801chr(128)\u5c31\u4f1a\u62a5\u9519\u3002\u6240\u4ee5\uff0c\u5982\u679c\u4f60\u7684\u76ee\u7684\u662f\u8981\u80fd\u652f\u6301chr(i)\uff0c0 &lt;= i &lt;= 255\uff0c\u90a3\u4e48\u6211\u8fd8\u662f\u63a8\u8350\u4f60\u7528latin1\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">PS2\uff1a\u5173\u4e8e\u8fd9\u4e2a\u95ee\u9898\uff0c\u300aFluent Python\u300b\u7684\u7b2c4\u7ae0\u503c\u5f97\u4e00\u8bfb\uff0c\u8bb2\u5f97\u975e\u5e38\u6e05\u695a\u3002<\/span><\/p>\n<p><span style=\"font-size: 14px;\">\u53c2\u8003\u8d44\u6599\uff1a<\/span><br \/>\n<span style=\"font-size: 14px;\">* \u300aFluent Python\u300b, Chapter 4<\/span><br \/>\n<span style=\"font-size: 14px;\">* http:\/\/www.ascii-code.com\/<\/span><br \/>\n<span style=\"font-size: 14px;\">* https:\/\/en.wikibooks.org\/wiki\/Unicode\/Character_reference\/0000-0FFF<\/span><br \/>\n<span style=\"font-size: 14px;\">* https:\/\/en.wikipedia.org\/wiki\/Extended_ASCII#ISO_8859_and_proprietary_adaptations<\/span><br \/>\n<span style=\"font-size: 14px;\">* https:\/\/docs.python.org\/3.5\/library\/unicodedata.html<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14px;\">\u4f8b\u5b50\uff1a<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">def replace_char(ch):\r\n    if ch == \"a\":\r\n        return \"ab\"\r\n    return ch\r\n\r\ns = \"\u4f60\u597daaa\u963f\u65af\u8482\u82ac\"\r\nif isinstance(s, str) is True:\r\n    try:\r\n        print(111)\r\n        s = s.encode(encoding=\"UTF-8\")\r\n        t = s.decode(encoding=\"UTF-8\")\r\n        print(t)\r\n    except:\r\n        pass\r\n\r\nprint(len(s))\r\nprint(s)\r\nl = list(s)\r\nprint(l)\r\ns =  b\"\".join([b\"\\\"\", b\"\".join(\r\n                             map(\r\n                                 lambda ch: replace_char(ch).encode(\"latin1\"),\r\n                                 map(lambda o: chr(o), s)\r\n                             )\r\n                         )\r\n             , b\"\\\"\"])\r\n\r\nprint(len(s))\r\nprint(s)\r\n\r\nprint(type(s))\r\ns = str(s, \"UTF-8\")\r\n\r\nprint(s)<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\n\t<span style=\"line-height:1;font-size:14px;\">\u539f\u6587\uff1a<\/span><span style=\"line-height:1;\"><a href=\"https:\/\/www.oschina.net\/question\/2741863_2199513\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-size:14px;\">https:\/\/www.oschina.net\/question\/2741863_2199513<\/span><\/a><\/span>\n<\/p>\n<p>\n\t\n<\/p>\n<p>\n\t<span style=\"font-size:14px;\">\u95ee\uff1a<\/span><br \/>\n<span style=\"font-size:14px;\">\u5728 num&lt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#8216;utf-8&#8217;)\u5f97\u5230\u7684\u662f\u4e00\u4e2a\u5b57\u7b26\u7684ascii\u5341\u516d\u8fdb\u5236<\/span><br \/>\n<span style=\"font-size:14px;\">\u4f46\u662f\u5728num&gt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#8216;utf-8&#8217;)\u5f97\u5230\u7684\u662f\u4e24\u4e2a\u5b57\u8282\u7684ascii\u5341\u516d\u8fdb\u5236\uff0c\u8bf7\u95ee\u8be5\u5982\u4f55\u8f6c\u6362\uff0c\u6211\u80fd\u591f\u5f97\u5230\u4e00\u4e2a\u5b57\u8282\u7684\u5341\u516d\u8fdb&#8230;<\/span><\/p>\n","protected":false},"author":1,"featured_media":556,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[334],"tags":[348],"class_list":["post-260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b - Wayne&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/weizn.net\/?p=260\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b - Wayne&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"\u539f\u6587\uff1ahttps:\/\/www.oschina.net\/question\/2741863_2199513       \u95ee\uff1a \u5728 num&lt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#039;utf-8&#039;)\u5f97\u5230\u7684\u662f\u4e00\u4e2a\u5b57\u7b26\u7684ascii\u5341\u516d\u8fdb\u5236 \u4f46\u662f\u5728num&gt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode(&#039;utf-8&#039;)\u5f97\u5230\u7684\u662f\u4e24\u4e2a\u5b57\u8282\u7684ascii\u5341\u516d\u8fdb\u5236\uff0c\u8bf7\u95ee\u8be5\u5982\u4f55\u8f6c\u6362\uff0c\u6211\u80fd\u591f\u5f97\u5230\u4e00\u4e2a\u5b57\u8282\u7684\u5341\u516d\u8fdb...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/weizn.net\/?p=260\" \/>\n<meta property=\"og:site_name\" content=\"Wayne&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-10T02:59:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-30T17:59:04+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"zinan\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/weizn.net\/#website\",\"url\":\"http:\/\/weizn.net\/\",\"name\":\"Wayne&#039;s Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/weizn.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/weizn.net\/?p=260#primaryimage\",\"inLanguage\":\"zh-Hans\",\"url\":\"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg\",\"contentUrl\":\"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/weizn.net\/?p=260#webpage\",\"url\":\"http:\/\/weizn.net\/?p=260\",\"name\":\"Python3\\u5982\\u4f55\\u4f7f\\u7528chr()\\u628a\\u4e00\\u4e2a\\u5927\\u4e8e128\\u6570\\u5b57\\u8f6c\\u4e3aascii\\u7684bytes\\u7c7b\\u578b - Wayne&#039;s Blog\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=260#primaryimage\"},\"datePublished\":\"2019-01-10T02:59:42+00:00\",\"dateModified\":\"2020-09-30T17:59:04+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/weizn.net\/?p=260#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/weizn.net\/?p=260\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/weizn.net\/?p=260#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\\u9996\\u9875\",\"item\":\"http:\/\/weizn.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python3\\u5982\\u4f55\\u4f7f\\u7528chr()\\u628a\\u4e00\\u4e2a\\u5927\\u4e8e128\\u6570\\u5b57\\u8f6c\\u4e3aascii\\u7684bytes\\u7c7b\\u578b\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/weizn.net\/?p=260#article\",\"isPartOf\":{\"@id\":\"http:\/\/weizn.net\/?p=260#webpage\"},\"author\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"headline\":\"Python3\\u5982\\u4f55\\u4f7f\\u7528chr()\\u628a\\u4e00\\u4e2a\\u5927\\u4e8e128\\u6570\\u5b57\\u8f6c\\u4e3aascii\\u7684bytes\\u7c7b\\u578b\",\"datePublished\":\"2019-01-10T02:59:42+00:00\",\"dateModified\":\"2020-09-30T17:59:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/weizn.net\/?p=260#webpage\"},\"wordCount\":181,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\"},\"image\":{\"@id\":\"http:\/\/weizn.net\/?p=260#primaryimage\"},\"thumbnailUrl\":\"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg\",\"keywords\":[\"Python\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/weizn.net\/?p=260#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264\",\"name\":\"zinan\",\"logo\":{\"@id\":\"http:\/\/weizn.net\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b - Wayne&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/weizn.net\/?p=260","og_locale":"zh_CN","og_type":"article","og_title":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b - Wayne&#039;s Blog","og_description":"\u539f\u6587\uff1ahttps:\/\/www.oschina.net\/question\/2741863_2199513       \u95ee\uff1a \u5728 num&lt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode('utf-8')\u5f97\u5230\u7684\u662f\u4e00\u4e2a\u5b57\u7b26\u7684ascii\u5341\u516d\u8fdb\u5236 \u4f46\u662f\u5728num&gt;128\u7684\u65f6\u5019\uff0c\u4f7f\u7528chr(num).encode('utf-8')\u5f97\u5230\u7684\u662f\u4e24\u4e2a\u5b57\u8282\u7684ascii\u5341\u516d\u8fdb\u5236\uff0c\u8bf7\u95ee\u8be5\u5982\u4f55\u8f6c\u6362\uff0c\u6211\u80fd\u591f\u5f97\u5230\u4e00\u4e2a\u5b57\u8282\u7684\u5341\u516d\u8fdb...","og_url":"http:\/\/weizn.net\/?p=260","og_site_name":"Wayne&#039;s Blog","article_published_time":"2019-01-10T02:59:42+00:00","article_modified_time":"2020-09-30T17:59:04+00:00","og_image":[{"width":1000,"height":667,"url":"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg","path":"\/app\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg","size":"full","id":556,"alt":"","pixels":667000,"type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"zinan","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/weizn.net\/#website","url":"http:\/\/weizn.net\/","name":"Wayne&#039;s Blog","description":"","publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/weizn.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"ImageObject","@id":"http:\/\/weizn.net\/?p=260#primaryimage","inLanguage":"zh-Hans","url":"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg","contentUrl":"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg","width":1000,"height":667},{"@type":"WebPage","@id":"http:\/\/weizn.net\/?p=260#webpage","url":"http:\/\/weizn.net\/?p=260","name":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b - Wayne&#039;s Blog","isPartOf":{"@id":"http:\/\/weizn.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/weizn.net\/?p=260#primaryimage"},"datePublished":"2019-01-10T02:59:42+00:00","dateModified":"2020-09-30T17:59:04+00:00","breadcrumb":{"@id":"http:\/\/weizn.net\/?p=260#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/weizn.net\/?p=260"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/weizn.net\/?p=260#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/weizn.net\/"},{"@type":"ListItem","position":2,"name":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b"}]},{"@type":"Article","@id":"http:\/\/weizn.net\/?p=260#article","isPartOf":{"@id":"http:\/\/weizn.net\/?p=260#webpage"},"author":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"headline":"Python3\u5982\u4f55\u4f7f\u7528chr()\u628a\u4e00\u4e2a\u5927\u4e8e128\u6570\u5b57\u8f6c\u4e3aascii\u7684bytes\u7c7b\u578b","datePublished":"2019-01-10T02:59:42+00:00","dateModified":"2020-09-30T17:59:04+00:00","mainEntityOfPage":{"@id":"http:\/\/weizn.net\/?p=260#webpage"},"wordCount":181,"commentCount":0,"publisher":{"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264"},"image":{"@id":"http:\/\/weizn.net\/?p=260#primaryimage"},"thumbnailUrl":"http:\/\/weizn.net\/wp-content\/uploads\/2019\/01\/shutterstock_684957946.jpg","keywords":["Python"],"articleSection":["Python"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/weizn.net\/?p=260#respond"]}]},{"@type":["Person","Organization"],"@id":"http:\/\/weizn.net\/#\/schema\/person\/e88bc12c590502d8b6249326f960b264","name":"zinan","logo":{"@id":"http:\/\/weizn.net\/#personlogo"}}]}},"_links":{"self":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":2,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":562,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/562"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=\/wp\/v2\/media\/556"}],"wp:attachment":[{"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weizn.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}