Encoding is always hard to get right. At least to many programs and programers I have seen, getting encoding right is not a trivial task at all. If we just need to work with the 26 characters in English and a few digits and symbols, a lot of problems will be gone. But since the fall of Towser of Babel, we have so many languages–and my mother tongue is one of the most special and ancient languages–Chinese–so I read and work with Chinese stuff a lot.