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 30303] New: - Cannot read word documents properties for docs created on Mac
Date Sat, 24 Jul 2004 11:49:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30303>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30303

Cannot read word documents properties for docs created on Mac

           Summary: Cannot read word documents properties for docs created
                    on Mac
           Product: POI
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: HPFS
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: angsuman@taragana.com


Several word documents(probably all) created on Mac and opened for reading 
properties on windows caused a UnsupportedEncodingException cp10000 in the line:
value = new String(src, (int) first, l, codepageToEncoding(codepage));

That is because I think there is a parsing error in extracting the encoding. 
However the actual text looked ok. So my workaround was:

value = new String(src, (int) first, l);
                if(codepage != -1) {
                    try {
                        value = new String(src, (int) first, l, 
codepageToEncoding(codepage));
                    } catch(UnsupportedEncodingException ignore) {
                        // The previous assignment is acceptable when the 
encoding is not supported
                        // Want to throw a warning message here, but how?
                    }
                }

Let me know if you need any sample documents to demonstrate the error. I have 
quite a few of them.

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


Mime
View raw message