Fix encoding of strings