Forcing encoding of strings