https://issues.apache.org/bugzilla/show_bug.cgi?id=45473

           Summary: HWPFwrite misbehaves on this Hebrew word file
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HWPF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=22311)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22311)
this file is not handled correctly

Simply reading and writing this file:

                HWPFDocument doc = new HWPFDocument(new
FileInputStream("hebrew.doc"));
                FileOutputStream fos=new FileOutputStream("hebrew2.doc");
                doc.write(fos);

generates a corrupted word file which can not be read by either Word or POI:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at
org.apache.poi.hwpf.model.TextPieceTable.<init>(TextPieceTable.java:91)
        at
org.apache.poi.hwpf.model.ComplexFileTable.<init>(ComplexFileTable.java:59)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:219)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:152)
        at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:140)
        at HWPFwrite.main(HWPFwrite.java:19)

I am using POI 3.1 final


-- 
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]

Reply via email to