Fixed encoding of non-ASCII chars.