From 9c6fdb6f53378c1d411ab302528ba8f56f041414 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Sun, 13 Jun 2010 06:26:14 +0000 Subject: [PATCH] force ASCII encoding when compiling sources, fixed unmappable characters for encoding ASCII git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@954172 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 16 +++++++++++++++- .../poi/hssf/extractor/TestExcelExtractor.java | 2 +- .../hssf/usermodel/TestHSSFDataFormatter.java | 6 +++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index f0273024c6..6de19159dd 100644 --- a/build.xml +++ b/build.xml @@ -66,6 +66,9 @@ under the License. + + + + srcdir="${main.output.dir}" + encoding="${java.source.encoding}"> + diff --git a/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java b/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java index ed2da48bd4..00b3afad8f 100644 --- a/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java +++ b/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java @@ -251,7 +251,7 @@ public final class TestExcelExtractor extends TestCase { ); assertTrue( text.indexOf( - "£nn.nn\t£10.52\n" + "\u00a3nn.nn\t\u00a310.52\n" ) > -1 ); } diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java index e5f1f8129c..4759a6c04b 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java @@ -405,9 +405,9 @@ public final class TestHSSFDataFormatter extends TestCase { assertEquals("10.5", f.formatCellValue(sheet.getRow(11).getCell(1))); // text isn't quite the format rule... - assertEquals("£nn.nn", sheet.getRow(12).getCell(0).getStringCellValue()); - assertEquals("\"£\"#,##0.00", sheet.getRow(12).getCell(1).getCellStyle().getDataFormatString()); - assertEquals("£10.52", f.formatCellValue(sheet.getRow(12).getCell(1))); + assertEquals("\u00a3nn.nn", sheet.getRow(12).getCell(0).getStringCellValue()); + assertEquals("\"\u00a3\"#,##0.00", sheet.getRow(12).getCell(1).getCellStyle().getDataFormatString()); + assertEquals("\u00a310.52", f.formatCellValue(sheet.getRow(12).getCell(1))); } private static void log(String msg) {