[
https://issues.apache.org/jira/browse/PDFBOX-5020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr closed PDFBOX-5020.
-----------------------------------
Resolution: Invalid
Closing as this isn't about PDFBox. You're welcome to reopen if you disagree.
You can also comment.
> Surrogate characters are decoded wrongly in makeJustificationArray
> ------------------------------------------------------------------
>
> Key: PDFBOX-5020
> URL: https://issues.apache.org/jira/browse/PDFBOX-5020
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.21
> Reporter: Emanuel Cozariz
> Priority: Major
> Attachments: CODE2002.TTF
>
>
> Given the following string 𧙗, this will be encoded as '\uD85D\uDE57'
> The above string will be accepted by the font CODE2002.ttf
>
> {code:java}
> PDFont font = PDType0Font.load(doc, new File("CODE2002.ttf"));
> cs.showText("\uD85D\uDE57");
> {code}
> But it is incorrectly decoded.
> Method makeJustificationArray of PdfBoxFastOutputDevice
> uses Character.toString(c) to add to the data array
> uD85D => Character.toString(c) will decode as �
> uDE57 => Character.toString(c) will decode as �
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]