Possible workaround for the encoding problem

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 difference between that page and most others is that one employed Unicode numerical character references (NCRs) for Chinese characters and diacritics.

Entering such code appears to be a stable way of getting around the hack. Thus, for example, in order for the characters “漢字” to appear in the published post correctly despite the encoding hack into Swedish, they would need to be entered in the post’s HTML as “漢字” rather than in the more human-friendly direct form of “漢字”. The same goes for most diacritics.

So, although this isn’t a real solution, 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’t become scrambled.

This should also mean that your comments can again safely include Chinese characters, etc., as long as you use NCRs as well, which can be accomplished with relatively little hassle by employing Pinyin.info’s online tool to convert Chinese characters and Pinyin diacritics to Unicode numerical character references. Check it out.

Look, Ma, no GIFs or PNGs!

Wǒ ài Hànyǔ Pīnyīn!
我愛漢語拼音!

2 thoughts on “Possible workaround for the encoding problem

Leave a Reply

Your email address will not be published. Required fields are marked *