[
https://issues.apache.org/jira/browse/PDFBOX-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13959715#comment-13959715
]
John Hewson commented on PDFBOX-2011:
-------------------------------------
Yes, it is weird because Character -> Name mappings are not really valid,
because an Encoding is a Name -> Character mapping so it's not guaranteed to be
invertible. Basically, the current internal PDFBox implementation is not
correct, so we don't want to make it part of the public API.
In order to decide whether or not small changes make sense we need to
understand the context, what are you trying to do? There is usually more than
one way to achieve something and it's not possible for us to make the best
changes when we don't know what the goal is.
> Please extend base class "Encoding" with 2 methods to access global name2char
> and char2name maps
> ------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-2011
> URL: https://issues.apache.org/jira/browse/PDFBOX-2011
> Project: PDFBox
> Issue Type: Wish
> Components: PDModel
> Affects Versions: 1.8.4, 2.0.0
> Reporter: Philip Helger
>
> Hi!
> It would be kind if you could extend the Encoding base class with the
> following 2 methods so that external access to the static maps is easier:
> public static Map <String, String> getCharacterToNameMap () {
> return Collections.unmodifiableMap (CHARACTER_TO_NAME);
> }
> public static Map <String, String> getNameToCharacterMap () {
> return Collections.unmodifiableMap (NAME_TO_CHARACTER);
> }
> Thanks, Philip
--
This message was sent by Atlassian JIRA
(v6.2#6252)