|
|
@ -1471,9 +1471,12 @@ public class MessageHelper {
|
|
|
|
if (!TextUtils.isEmpty(charset))
|
|
|
|
if (!TextUtils.isEmpty(charset))
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Log.i("Charset=" + meta);
|
|
|
|
Log.i("Charset=" + meta);
|
|
|
|
|
|
|
|
Charset c = Charset.forName(charset);
|
|
|
|
|
|
|
|
if (c.equals(StandardCharsets.UTF_8) && !Helper.isUTF8(result))
|
|
|
|
|
|
|
|
break;
|
|
|
|
result = new String(result.getBytes(StandardCharsets.ISO_8859_1), charset);
|
|
|
|
result = new String(result.getBytes(StandardCharsets.ISO_8859_1), charset);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
} catch (UnsupportedEncodingException ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.w(ex);
|
|
|
|
Log.w(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|