tballison commented on a change in pull request #433:
URL: https://github.com/apache/tika/pull/433#discussion_r622541769



##########
File path: 
tika-parsers/tika-parsers-classic/tika-parsers-classic-modules/tika-parser-pkg-module/src/main/java/org/apache/tika/parser/pkg/PackageParser.java
##########
@@ -392,6 +392,15 @@ private void parseEntry(ArchiveInputStream archive, 
ArchiveEntry entry,
                             XHTMLContentHandler xhtml)
             throws SAXException, IOException, TikaException {
         String name = entry.getName();
+        
+        //Try to detect charset of archive entry in case of non-unicode 
filename is used
+        if (entry instanceof ZipArchiveEntry) {
+            detector.setText(((ZipArchiveEntry) entry).getRawName());

Review comment:
       This is embarrassing, but where is the detector initialized...how are 
you getting it?
   
   Maybe have PackageParser extend AbstractEncodingDetectorParser?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to