mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Fixed signed content character set
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user