[ 
https://issues.apache.org/jira/browse/TIKA-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14306931#comment-14306931
 ] 

ASF GitHub Bot commented on TIKA-936:
-------------------------------------

GitHub user kongxianghe1234 opened a pull request:

    https://github.com/apache/tika/pull/27

    Update RarParser.java

    if you want to detect a file which has chinese-like fileName ? this way you 
did will be error.
    details TIKA-936.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kongxianghe1234/tika patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tika/pull/27.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #27
    
----
commit 6d3913047980521df07ae10922a6c4233dadbb52
Author: 孔祥和  JavaMiner <kong1011437...@gmail.com>
Date:   2015-02-05T09:52:41Z

    Update RarParser.java
    
    if you want to detect a file which has chinese-like fileName ? this way you 
did will be error.
    details TIKA-936.

----


> encoding of ZipArchiveInputStream
> ---------------------------------
>
>                 Key: TIKA-936
>                 URL: https://issues.apache.org/jira/browse/TIKA-936
>             Project: Tika
>          Issue Type: Improvement
>          Components: parser
>    Affects Versions: 1.1
>            Reporter: Shinichiro Abe
>            Assignee: Jukka Zitting
>         Attachments: x-日本語メモ.zip
>
>
> When extracting from the zip files which are zipped at Windows OS(Japanese), 
> the file name extracted from zip is garbled.
> ZipArchiveInputStream has three constructors. Modifying like the below, the 
> file name was not garbled. I specified the encoding - SJIS.
> {code:title=PackageExtractor|borderStyle=solid}
> public void parse(InputStream stream)
>  :
>  //unpack(new ZipArchiveInputStream(stream), xhtml);  
>  unpack(new ZipArchiveInputStream(stream,"SJIS",true), xhtml); 
>  :
> {code}
> In first constructor -the platform's default encoding- UTF-8 is used.  In my 
> case the encoding of my computer is UTF-8, the encoding of zip file is SJIS, 
> so the file name was garbled. We will get garbled file name if there is a 
> difference of  encoding between -platform- this constructor and zip file.
> I want Tika to parse zip by giving some kind of encoding parameter per file, 
> Where should I give the encoding, somewhere in Metadata or ParseContext? 
> Please support this. I am using Tika via Solr(SolrCell), so when posting zip 
> file to Solr I want to add encoding parameter to the request.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to