pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1196127 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java
Date Tue, 01 Nov 2011 16:54:22 GMT
Author: lehmi
Date: Tue Nov  1 16:54:21 2011
New Revision: 1196127

URL: http://svn.apache.org/viewvc?rev=1196127&view=rev
Log:
PDFBOX-1085: return ".notdef" instead of "space" for unknown codes as proposed by Wulf Berschin

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java?rev=1196127&r1=1196126&r2=1196127&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/encoding/Encoding.java Tue Nov 
1 16:54:21 2011
@@ -30,6 +30,10 @@ import java.util.Map;
 public abstract class Encoding
 {
 
+    /**
+     * Identifies a non-mapped character. 
+     */
+    private static final String NOTDEF = ".notdef";
 
     /**
      * This is a mapping from a character code to a character name.
@@ -88,10 +92,7 @@ public abstract class Encoding
         String name = codeToName.get( code );
         if( name == null )
         {
-            //lets be forgiving for now
-            name = "space";
-            //throw new IOException( getClass().getName() +
-            //                       ": No name for character code '" + code + "'" );
+            name = NOTDEF;
         }
         return name;
     }



Mime
View raw message