mirror of https://github.com/M66B/FairEmail.git
Fixed signed content character set
This commit is contained in:
parent
a343af5d7a
commit
3b8808e811
|
@ -3328,7 +3328,7 @@ public class MessageHelper {
|
|||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
apart.part.writeTo(bos);
|
||||
String raw = new String(bos.toByteArray());
|
||||
String raw = new String(bos.toByteArray(), StandardCharsets.ISO_8859_1);
|
||||
String[] parts = raw.split("\\r?\\n" + Pattern.quote("--" + boundary) + "\\r?\\n");
|
||||
if (parts.length < 2)
|
||||
throw new ParseException("Signed part missing");
|
||||
|
@ -3341,7 +3341,7 @@ public class MessageHelper {
|
|||
c = c.replaceAll(" +$", ""); // trim trailing spaces
|
||||
|
||||
try (OutputStream os = new FileOutputStream(file)) {
|
||||
os.write(c.getBytes());
|
||||
os.write(c.getBytes(StandardCharsets.ISO_8859_1));
|
||||
}
|
||||
|
||||
db.attachment().setDownloaded(local.id, file.length());
|
||||
|
|
Loading…
Reference in New Issue