Return-Path: X-Original-To: apmail-pdfbox-commits-archive@www.apache.org Delivered-To: apmail-pdfbox-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EFA211A01 for ; Mon, 5 May 2014 21:01:29 +0000 (UTC) Received: (qmail 54929 invoked by uid 500); 5 May 2014 21:01:29 -0000 Delivered-To: apmail-pdfbox-commits-archive@pdfbox.apache.org Received: (qmail 54917 invoked by uid 500); 5 May 2014 21:01:29 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 54909 invoked by uid 99); 5 May 2014 21:01:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2014 21:01:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2014 21:01:27 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 67AF52388A6E; Mon, 5 May 2014 21:01:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1592629 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java Date: Mon, 05 May 2014 21:01:07 -0000 To: commits@pdfbox.apache.org From: lehmi@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140505210107.67AF52388A6E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: lehmi Date: Mon May 5 21:01:06 2014 New Revision: 1592629 URL: http://svn.apache.org/r1592629 Log: PDFBOX-2058: added getCharacterForName Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java?rev=1592629&r1=1592628&r2=1592629&view=diff ============================================================================== --- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java (original) +++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/encoding/Encoding.java Mon May 5 21:01:06 2014 @@ -246,6 +246,24 @@ public abstract class Encoding implement } /** + * This will take a name and get the character code for that name. + * + * @param name The name. + * + * @return The name of the character. + * + */ + public static String getCharacterForName(String name) + { + if (NAME_TO_CHARACTER.containsKey(name)) + { + LOG.debug("No character for name " + name); + return NAME_TO_CHARACTER.get(name); + } + return null; + } + + /** * This will take a character code and get the name from the code. * * @param c The character.