Bug 51530 - [PATCH] AFP double byte fonts
Summary: [PATCH] AFP double byte fonts
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: fonts (show other bugs)
Version: 1.0
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 14:04 UTC by Mehdi Houshmand
Modified: 2012-04-01 06:19 UTC (History)
0 users



Attachments
[PATCH] the fix (22.31 KB, patch)
2011-07-19 14:04 UTC, Mehdi Houshmand
Details | Diff
AFP dbcs patch (29.69 KB, patch)
2011-09-05 08:58 UTC, Mehdi Houshmand
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mehdi Houshmand 2011-07-19 14:04:05 UTC
Created attachment 27298 [details]
[PATCH] the fix

Some double byte characters aren't being written correctly to an AFP document. These are specifically EBCDIC encoded double byte fonts, as the java.nio.CharsetEncoder prepends and appends the "Shift Out Shift In" operators (0x0E and 0x0F respectively) to the byte array. 

These are line data commands used for shifting between single and double byte encodings and not necessary in AFP. The result being that the characters aren't encoded correctly. 

These need to be removed, however, there's no "fool proof" way of distinguishing between an EBCDIC DBCS (double byte character set) and other DBCSs. Thus I have implemented an optional attribute "ebcdic-dbcs" to remove these 0x0E and 0x0F operators.

I've tested this here, but can't provide an EBCDIC encoded DBCS due to licensing issues.
Comment 1 Mehdi Houshmand 2011-09-05 08:58:53 UTC
Created attachment 27458 [details]
AFP dbcs patch

I failed to include a file in the patch
Comment 2 Glenn Adams 2012-04-01 06:19:14 UTC
batch transition to closed; if someone wishes to restore one of these to resolved in order to perform a verification step, then feel free to do so