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

           Summary: [PATCH] hsmf - Enconding error when using
                    POIFSChunkParser on Linux
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: POIFS
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=23638)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23638)
changes to StringChunk class

Changes to the StringChunk class

This applies to the hsmf component in the scratchpad area.

The setValue method in StringChunk class uses default platform encoding to
convert stream parameter into String. This conversion doesn't work when the OS
is Linux.

The solution was to test chunk type and set encoding used to convert the Stream
to String :
  - if type is "NEW_STRING" (indeed Unicode) : we set encoding to "UTF16-LE"
  - if type is "OLD_STRING" : we set encoding to "CP1252"

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