{"id":6749,"date":"2015-11-15T23:39:57","date_gmt":"2015-11-15T15:39:57","guid":{"rendered":"https:\/\/pinyin.info\/news\/?p=6749"},"modified":"2015-11-15T23:39:57","modified_gmt":"2015-11-15T15:39:57","slug":"possible-workaround-for-the-encoding-problem","status":"publish","type":"post","link":"https:\/\/pinyin.info\/news\/2015\/possible-workaround-for-the-encoding-problem\/","title":{"rendered":"Possible workaround for the encoding problem"},"content":{"rendered":"<p>Earlier this evening, as I was browsing through some old posts here on Pinyin News, I was startled to notice in one post the presence of some Chinese characters that were <em>not<\/em> scrambled but correct (e.g., <a href=\"https:\/\/pinyin.info\/news\/2005\/romanization-to-be-allowed-on-some-taiwan-id-cards\/\">here<\/a>). I investigated. <\/p>\n<p>The difference between that page and most others is that one employed Unicode numerical character references (NCRs) for Chinese characters and diacritics. <\/p>\n<p>Entering such code appears to be a stable way of getting around the hack. Thus, for example, in order for the characters &#8220;&#28450;&#23383;&#8221; to appear in the published post correctly despite the encoding hack into Swedish, they would need to be entered in the post&#8217;s HTML as &#8220;&amp;#28450;&amp;#23383;&#8221; rather than in the more human-friendly direct form of &#8220;&#28450;&#23383;&#8221;. The same goes for most diacritics. <\/p>\n<p>So, although this isn&#8217;t a real <em>solution<\/em>, at least I should be able to make new posts here render correctly; and, no less importantly, these new posts should remain correct even after the encoding problem for the rest of the blog is finally fixed, since NCRs are ASCII-friendly and thus shouldn&#8217;t become scrambled. <\/p>\n<p>This <em>should<\/em> also mean that <strong>your comments can again safely include Chinese characters, etc., <em>as long as you use NCRs as well<\/em><\/strong>, which can be accomplished with relatively little hassle by employing Pinyin.info&#8217;s online tool to <a href=\"https:\/\/pinyin.info\/tools\/converter\/chars2uninumbers.html\">convert Chinese characters and Pinyin diacritics to Unicode numerical character references<\/a>. Check it out.<\/p>\n<p><em>Look, Ma, no GIFs or PNGs!<\/em><\/p>\n<div style=\"font-size: 3em; text-align: center; color: green;\">W&#466; &#224;i H&#224;ny&#468; P&#299;ny&#299;n!<br \/>\n&#25105;&#24859;&#28450;&#35486;&#25340;&#38899;!<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this evening, as I was browsing through some old posts here on Pinyin News, I was startled to notice in one post the presence of some Chinese characters that were not scrambled but correct (e.g., here). I investigated. The &hellip; <a href=\"https:\/\/pinyin.info\/news\/2015\/possible-workaround-for-the-encoding-problem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-6749","post","type-post","status-publish","format-standard","hentry","category-site-news"],"_links":{"self":[{"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/posts\/6749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/comments?post=6749"}],"version-history":[{"count":13,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/posts\/6749\/revisions"}],"predecessor-version":[{"id":6764,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/posts\/6749\/revisions\/6764"}],"wp:attachment":[{"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/media?parent=6749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/categories?post=6749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pinyin.info\/news\/wp-json\/wp\/v2\/tags?post=6749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}