diff --git a/app/src/main/java/protect/card_locker/importexport/CatimaExporter.java b/app/src/main/java/protect/card_locker/importexport/CatimaExporter.java index 809b48a5f..e8b3c5522 100644 --- a/app/src/main/java/protect/card_locker/importexport/CatimaExporter.java +++ b/app/src/main/java/protect/card_locker/importexport/CatimaExporter.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; +import java.nio.charset.StandardCharsets; import java.util.zip.ZipEntry; import protect.card_locker.DBHelper; @@ -44,7 +45,7 @@ public class CatimaExporter implements Exporter // Generate CSV ByteArrayOutputStream catimaOutputStream = new ByteArrayOutputStream(); - OutputStreamWriter catimaOutputStreamWriter = new OutputStreamWriter(catimaOutputStream); + OutputStreamWriter catimaOutputStreamWriter = new OutputStreamWriter(catimaOutputStream, StandardCharsets.UTF_8); writeCSV(db, catimaOutputStreamWriter); // Add CSV to zip file diff --git a/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java b/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java index 982f7f4c6..4ba4a6275 100644 --- a/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java +++ b/app/src/main/java/protect/card_locker/importexport/CatimaImporter.java @@ -57,7 +57,7 @@ public class CatimaImporter implements Importer public void importZipFile(Context context, DBHelper db, ZipInputStream input, LocalFileHeader localFileHeader) throws IOException, FormatException, InterruptedException { String fileName = localFileHeader.getFileName(); if (fileName.equals("catima.csv")) { - importCSV(context, db, new ByteArrayInputStream(ZipUtils.read(input).getBytes())); + importCSV(context, db, new ByteArrayInputStream(ZipUtils.read(input).getBytes(StandardCharsets.UTF_8))); } else { Utils.saveCardImage(context, ZipUtils.readImage(input), fileName); }