pdfbox-commits mailing list archives

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

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

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

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java?rev=1801616&r1=1801615&r2=1801616&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/PDFDocEncoding.java Tue
Jul 11 14:23:46 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