Your code displays Japanese wrong
That's extremely interesting, if not depressing.<p>So, if I have to display user-entered text (usernames, posts, comments, messages, form data, etc), and I want to do The Right Thing™:<p>- I cannot rely on user locale, because it might be set to something generic like English, or the user may be bi-lingual.<p>- I cannot rely on location, because the user may be traveling to a different CJK region, or somewhere else altogether.<p>- I cannot set a single lang: attribute for the whole page because it'll be wrong for the other two languages.<p>- The string alone is not sufficient to identify the language because you can write valid sentences in different CJK languages with the same codepoints.<p>- I cannot have a per-user language setting, because users may be bi-lingual.<p>What does that leave me? A dropdown list "C/J/K/Other" besides <i>every single text field</i>?<p>I'm chucking this on my pile of examples of software development being hopelessly broken by design, along with "unix time is non-monotonic and discontinuous at random" (hint: what's the unix time exactly 1e8 seconds, ~3 years, from now? Answer: it's up to the astronomers[1]!).<p>[1]: <a href="https://en.wikipedia.org/wiki/Unix_time#Leap_seconds" rel="nofollow">https://en.wikipedia.org/wiki/Unix_time#Leap_seconds</a><p>Edit: actually, even the dropdown list is insufficient because it only allows one language per string! How is a Japanese user asking for help learning Chinese supposed to write?