You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/05/13 21:39:00 UTC
[jira] [Commented] (PDFBOX-2798) PDTextStream does not support
UTF16 with BOM
[ https://issues.apache.org/jira/browse/PDFBOX-2798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542537#comment-14542537 ]
Tilman Hausherr commented on PDFBOX-2798:
-----------------------------------------
Do you have a file where this happens, or a test that fails?
> PDTextStream does not support UTF16 with BOM
> --------------------------------------------
>
> Key: PDFBOX-2798
> URL: https://issues.apache.org/jira/browse/PDFBOX-2798
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 1.8.10, 2.0.0
> Reporter: Michele Balistreri
> Attachments: PDTextStream-UTF16.diff
>
>
> the getAsString() method from PDTextStream is quite useful, but it does not support UTF-16 text. I added a small check on the first two bytes to support UTF-16 content. This is needed because two-bytes encodings do not degrade gracefully like UTF-8, even for plain ASCII text and so the resulting string is unusable.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org