poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46362] New: Multibyte string in StyleRecord doesn't be serialized correctly
Date Mon, 08 Dec 2008 01:11:52 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46362

           Summary: Multibyte string in StyleRecord doesn't be serialized
                    correctly
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: matsuyama@ariel-networks.com


Serialization error occures when write a workbook that contains multibyte
string style record.

Exception in thread "main" java.lang.IllegalStateException: Incorrect number of
bytes written - expected 35 but got 22
        at
org.apache.poi.hssf.record.StandardRecord.serialize(StandardRecord.java:39)
        at org.apache.poi.hssf.model.Workbook.serialize(Workbook.java:953)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:1287)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1191)
        at Test.main(Test.java:22)

Maybe, it is cause of StyleRecord doesn't care about uncompressed unicode or
compressed unicode by hasMultibyte.

I have attached a patch. Please check it.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message