mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Decode US-ASCII as ISO_8859_1
This commit is contained in:
parent
ba9340ab8e
commit
618a0cbfef
1 changed files with 6 additions and 3 deletions
|
@ -847,9 +847,12 @@ public class MessageHelper {
|
|||
// The first 127 characters are the same as in US-ASCII
|
||||
result = new String(result.getBytes(StandardCharsets.ISO_8859_1));
|
||||
} else {
|
||||
if ("US-ASCII".equals(Charset.forName(charset).name()) &&
|
||||
!"US-ASCII".equals(charset.toUpperCase()))
|
||||
warnings.add(context.getString(R.string.title_no_charset, charset));
|
||||
if ("US-ASCII".equals(charset.toUpperCase()))
|
||||
result = new String(result.getBytes(StandardCharsets.ISO_8859_1));
|
||||
else {
|
||||
if ("US-ASCII".equals(Charset.forName(charset).name()))
|
||||
warnings.add(context.getString(R.string.title_no_charset, charset));
|
||||
}
|
||||
}
|
||||
} catch (ParseException ex) {
|
||||
Log.w(ex);
|
||||
|
|
Loading…
Reference in a new issue