From c328a65d9755db33e6b1e1a17fb042537d531272 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 3 Jul 2011 17:36:30 -0300 Subject: [PATCH] Fix encodding issues in tests. --- .../main/java/com/wisemapping/exporter/FreemindExporter.java | 2 +- wise-webapp/src/test/data/wisemaps/simple-maps.mmr | 0 .../java/com/wisemapping/test/freemind/ImportExportTest.java | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 wise-webapp/src/test/data/wisemaps/simple-maps.mmr diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index d3c5145b..d9911349 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -51,7 +51,7 @@ public class FreemindExporter public void export(MindMap map, OutputStream outputStream) throws ExportException { try { - export(map.getUnzippedXml().getBytes(), outputStream); + export(map.getUnzippedXml().getBytes("UTF-8"), outputStream); } catch (IOException e) { throw new ExportException(e); } diff --git a/wise-webapp/src/test/data/wisemaps/simple-maps.mmr b/wise-webapp/src/test/data/wisemaps/simple-maps.mmr new file mode 100644 index 00000000..e69de29b diff --git a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java index 34ea6786..d7b2634e 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java @@ -72,7 +72,7 @@ public class ImportExportTest { private String readFile(@NotNull File file) throws IOException { // Load rec file co final FileInputStream fis = new FileInputStream(file); - final InputStreamReader isr = new InputStreamReader(fis); + final InputStreamReader isr = new InputStreamReader(fis,"UTF-8"); final BufferedReader br = new BufferedReader(isr); final StringBuilder result = new StringBuilder();