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: [email protected]
ReportedBy: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]