[
https://issues.apache.org/jira/browse/PDFBOX-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14149867#comment-14149867
]
John Hewson commented on PDFBOX-2384:
-------------------------------------
There's a related bug too. The constructor PDFTextStripper(String encoding)
allows an encoding to be specified, which is pretty strange because the value
returned from PDFTextStripper#getText() is a String which in Java is always
UTF-16. The only method to make use of this "encoding" is
TextNormalize#normalizeDiacritic() which checks if it begins with "UTF" and if
so, performs an NFKC normalization - but the input and output to
normalizeDiacritic are String objects, which are always UTF-16!
> ExtractText should default to UTF-8
> -----------------------------------
>
> Key: PDFBOX-2384
> URL: https://issues.apache.org/jira/browse/PDFBOX-2384
> Project: PDFBox
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 2.0.0
> Reporter: John Hewson
> Priority: Minor
>
> ExtractText (and perhaps also PDFTextStripper) should default to UTF-8, which
> is what most people expect. There have been two long-standing open issues
> PDFBOX-755, PDFBOX-970, because of not using having a good default.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)