Starting fixing character set handling to handle multi-byte encodings.