Set the String encoding according to the 'Content-Type: charset' header, if possible.