poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alain Mowat" <amo...@bluewin.ch>
Subject Problems with HSSF and character sets
Date Fri, 08 Dec 2006 16:49:33 GMT
    Hello,
    I'm having problems using HSSF with czech files, and probably other languages that have
special characters in them. 
    If I open a file, and then simply write this same file to the hard disk with no modification
whatsoever, the saving process actually modifies a certain number of characters and replaces
them by a '?'. 
    This happens with the following simple code : 
        POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("Path to file"));

        wb = new HSSFWorkbook(fs);

        FileOutputStream fileOut = new FileOutputStream("Some location");

        wb.write(fileOut);


    Strangely, not all characters are altered. For example, the word  "nebezpecn√°" becomes
"nebezpe?n√°" in one cell, but no modification is done to the same word in the following cell.

    It appears to come from the way the file is saved to the disk. Maybe POI saves the file
as an old Excel 95 file, the same problem seems to happen when this is done directly in Excel.

    Does anybody know how I can stop these alteration from happening?

    Thanks,

    Alain 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message