mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-30 19:56:10 +00:00
Fixed default charset
This commit is contained in:
parent
05f8d03e96
commit
8ee2e1ec83
1 changed files with 2 additions and 2 deletions
|
@ -817,11 +817,11 @@ public class MessageHelper {
|
|||
String charset = ct.getParameter("charset");
|
||||
if (TextUtils.isEmpty(charset)) {
|
||||
if (BuildConfig.DEBUG)
|
||||
warnings.add(context.getString(R.string.title_no_charset, ct.toString()));
|
||||
warnings.add(context.getString(R.string.title_no_charset, ct));
|
||||
// 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.toUpperCase()))
|
||||
if ("US-ASCII".equals(charset.toUpperCase()) || "ISO-8859-1".equals(charset.toUpperCase()))
|
||||
result = new String(result.getBytes(StandardCharsets.ISO_8859_1));
|
||||
else {
|
||||
if ("US-ASCII".equals(Charset.forName(charset).name()))
|
||||
|
|
Loading…
Reference in a new issue