You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "tsuyoushi (JIRA)" <ji...@apache.org> on 2017/08/02 06:38:00 UTC

[jira] [Comment Edited] (TIKA-2183) Can't Read file if its name is Arabic

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

tsuyoushi edited comment on TIKA-2183 at 8/2/17 6:37 AM:
---------------------------------------------------------

i try it ,and it works .
1. open  {color:#d04437}lib\http\client.py{color}
2. change the 'latin-1' to 'utf-8':
    values[i] = one_value.encode('utf-8')

#only in python 3



was (Author: tsuyokp):
i try it ,and it works .
1. open  {color:#d04437}lib\http\client.py{color}
2. change the 'latin-1' to 'utf-8':
    values[i] = one_value.encode('utf-8')


> Can't Read file if its name is Arabic
> -------------------------------------
>
>                 Key: TIKA-2183
>                 URL: https://issues.apache.org/jira/browse/TIKA-2183
>             Project: Tika
>          Issue Type: Bug
>          Components: general, languageidentifier
>    Affects Versions: 1.14
>            Reporter: Ahmad Sawalhah
>
> if I have an Arabic File name like ( احمد.docx ) it gives me this error
>  File "C:\Python34\lib\http\client.py", line 1109, in putheader
>     values[i] = one_value.encode('latin-1')
> UnicodeEncodeError: 'latin-1' codec can't encode characters in position 21-27: ordinal not in range(256)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)