diff --git a/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls b/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls new file mode 100644 index 000000000..17aa94475 Binary files /dev/null and b/src/testcases/org/apache/poi/hssf/data/DBCSSheetName.xls differ diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java index 5383b0fbd..9afd15278 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java @@ -396,6 +396,20 @@ public class TestHSSFSheet } + public void testDBCSName () throws Exception { + FileInputStream fis = null; + HSSFWorkbook wb = null; + + String filename = System.getProperty("HSSF.testdata.path"); + + filename = filename + "/DBCSSheetName.xls"; + fis = new FileInputStream(filename); + wb = new HSSFWorkbook(fis); + HSSFSheet s= wb.getSheetAt(1); + assertEquals ("DBCS Sheet Name 2", wb.getSheetName(1),"\u090f\u0915" ); + assertEquals("DBCS Sheet Name 1", wb.getSheetName(0),"\u091c\u093e"); + } + public static void main(java.lang.String[] args) { junit.textui.TestRunner.run(TestHSSFSheet.class); }