Skip to content

Commit cf33271

Browse files
Merge pull request #284 from tongwang/master
fix bug: non-ascii file name not supported in detect type
2 parents d077f42 + 3fec5e3 commit cf33271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tika/tika.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def detectType1(option, urlOrPath, serverEndpoint=ServerEndpoint, verbose=Verbos
476476
status, response = callServer('put', serverEndpoint, service, open(path, 'rb'),
477477
{
478478
'Accept': responseMimeType,
479-
'Content-Disposition': make_content_disposition_header(path)
479+
'Content-Disposition': make_content_disposition_header(path.encode('utf-8') if type(path) is unicode_string else path)
480480
},
481481
verbose, tikaServerJar, config_path=config_path, requestOptions=requestOptions)
482482
if csvOutput == 1:

0 commit comments

Comments
 (0)