pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1801617 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java
Date Tue, 11 Jul 2017 14:23:50 GMT
Author: tilman
Date: Tue Jul 11 14:23:50 2017
New Revision: 1801617

URL: http://svn.apache.org/viewvc?rev=1801617&view=rev
Log:
PDFBOX-3864: skip entries not in Unicode column of PDFDocEncoding specification

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java?rev=1801617&r1=1801616&r2=1801617&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java Tue Jul 11
14:23:50 2017
@@ -40,6 +40,20 @@ final class PDFDocEncoding
         // initialize with basically ISO-8859-1
         for (int i = 0; i < 256; i++)
         {
+            // skip entries not in Unicode column
+            if (i > 0x17 && i < 0x20)
+            {
+                continue;
+            }
+            if (i > 0x7E && i < 0xA1)
+            {
+                continue;
+            }
+            if (i == 0xAD)
+            {
+                continue;
+            }
+            
             set(i, (char)i);
         }
 



Mime
View raw message