Change default charset to UTF-8

This resolves #6374 where the character set is set to
`CharacterSets.MIMENAME_ANY_CHARSET` but the character set being
 used is _actually_ UTF-8.

Fixes #6374
Closes #6892
This commit is contained in:
Christian Bundy 2017-08-24 10:20:14 -07:00 committed by Moxie Marlinspike
parent 2add02c62f
commit 86eb14b7bb

View File

@ -24,7 +24,7 @@ public class PartParser {
String characterSet = CharacterSets.getMimeName(body.getPart(i).getCharset()); String characterSet = CharacterSets.getMimeName(body.getPart(i).getCharset());
if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET)) if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET))
characterSet = CharacterSets.MIMENAME_ISO_8859_1; characterSet = CharacterSets.UTF_8;
if (body.getPart(i).getData() != null) { if (body.getPart(i).getData() != null) {
partText = new String(body.getPart(i).getData(), characterSet); partText = new String(body.getPart(i).getData(), characterSet);