So, if I have to display user-entered text (usernames, posts, comments, messages, form data, etc), and I want to do The Right Thing™:
- I cannot rely on user locale, because it might be set to something generic like English, or the user may be bi-lingual.
- I cannot rely on location, because the user may be traveling to a different CJK region, or somewhere else altogether.
- I cannot set a single lang: attribute for the whole page because it'll be wrong for the other two languages.
- The string alone is not sufficient to identify the language because you can write valid sentences in different CJK languages with the same codepoints.
- I cannot have a per-user language setting, because users may be bi-lingual.
What does that leave me? A dropdown list "C/J/K/Other" besides every single text field?
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]!).
[1]: https://en.wikipedia.org/wiki/Unix_time#Leap_seconds
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?