Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.2
-
Component/s: None
-
Labels:None
-
Environment:any
-
ICEsoft Forum Reference:
Description
The community member brought to my attention an encoding issue with some Greek characters in the form attached document.
Activity
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23980 | Thu Feb 17 11:29:31 MST 2011 | patrick.corless | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/OutlineItem.java
|
Patrick Corless
created issue -
Patrick Corless
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 4.2 [ 10243 ] |
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
If you take a look at the OutlineItem.java class the method getTitle() does a bunch a work to property encode the title.
From my initial analysis the the getBytes() call is not applying the correct encoding and the resulting byte stream isn't correct.
I've have to do a bunch of regression testing but I think the getBytes() call should be removed and the following for loop should be replaced with:
for (int i = 2; i < hexTmp.length(); i += 2) {
{ int b1 = ((int) hexTmp.charAt(i)) & 0xFF; int b2 = ((int) hexTmp.charAt(i + 1)) & 0xFF; sb1.append((char) (b1 * 256 + b2)); }try
catch (Exception ex)
{ // intentionally left blank. }}