Summary: | ISO-8859-15 support in StringUtils | ||
---|---|---|---|
Product: | POI | Reporter: | Alejandro Torras <atec.post> |
Component: | POI Overall | Assignee: | POI Developers List <dev> |
Status: | RESOLVED WORKSFORME | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 3.6-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | Test case |
Description
Alejandro Torras
2011-07-28 07:20:49 UTC
Simple java code to dump the contents: private void dumpExcel(InputStream is) throws Exception { final HSSFSheet st = new HSSFWorkbook(new POIFSFileSystem(is)).getSheetAt(0); for (final Iterator<Row> ri = st.rowIterator(); ri.hasNext();) { final Row r = ri.next(); for (final Iterator<Cell> ci = r.cellIterator(); ci.hasNext();) { final Cell c = ci.next(); c.setCellType(Cell.CELL_TYPE_STRING); System.out.print(c.getStringCellValue() + '\t'); } System.out.println(); } } It's not a question of what would be better, but what Excel itself does... Normally a string with a euro symbol in it will get stored as a unicode string, not an 8 bit one. Could you try creating some files with characters that are in ISO-8859-1 but not -15, and the other way around? We can then use those to try to see if Excel flags in some way when it's deciding to use one encoding or the other Waiting for information since 2011, therefore I am resolving this for now, please reopen with some more sample files if this is still an issue for you. |