in reply to questions about character encoding
Here's where the problem is (and what the error message was telling you). Under UTF-8, 7-bit ASCII characters retain their old mappings. But in order to encode multi-byte characters, UTF-8 uses the high bits. In order to encode a character that is two bytes long, the first byte's high bit is set to one, the second to zero. And so forth for characters that take up more bytes. If you take a string of Latin-A characters (I think they're called), their high bits won't match the carefully thought-out system of UTF-8 encoding, and make a mess of it. The string ικλ, for example, has three high bits set to one in a row...
...which is what "malformed UTF-8 character" means.
Update: that should have read "Latin 1," not "Latin A." Also, here's where I learned the little I know about Unicode.
BCE
--Your punctuation skills are insufficient!
|
|---|