[
https://issues.apache.org/jira/browse/PDFBOX-2837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594587#comment-14594587
]
ASF subversion and git services commented on PDFBOX-2837:
---------------------------------------------------------
Commit 1686612 from [~tilman] in branch 'pdfbox/branches/1.8'
[ https://svn.apache.org/r1686612 ]
PDFBOX-2837: avoid string being converted to EBCDIC in non ASCII systems; fix
typos
> PDFBox creates files with EBCDIC code on z/OS
> ---------------------------------------------
>
> Key: PDFBOX-2837
> URL: https://issues.apache.org/jira/browse/PDFBOX-2837
> Project: PDFBox
> Issue Type: Bug
> Components: Writing
> Affects Versions: 1.8.9, 1.8.10, 2.0.0
> Environment: OS: Unix Service running on Z/OS.
> JRE: JRE 1.6.0 IBM J9 2.4 z/OS s390-31
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
>
> A PDF file created on z/OS (an IBM mainframe os) has this
> {code}
> xref
> ð ù
> 0000000000 65535 f
> {code}
> the two chars are EBCDIC code for 0 9. The cause is this code that outputs in
> the system default encoding:
> {code}
> private void writeXrefRange(long x, long y) throws IOException
> {
> getStandardOutput().write(String.valueOf(x).getBytes());
> getStandardOutput().write(SPACE);
> getStandardOutput().write(String.valueOf(y).getBytes());
> getStandardOutput().writeEOL();
> }
> {code}
> getBytes should use the specific charset, e.g. getBytes(Charsets.ISO_8859_1).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]