Skip to content

Commit 3fec5e3

Browse files
committed
fix bug: non-ascii file name not supported in detect type
1 parent effa659 commit 3fec5e3

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
@@ -475,7 +475,7 @@ def detectType1(option, urlOrPath, serverEndpoint=ServerEndpoint, verbose=Verbos
475475
status, response = callServer('put', serverEndpoint, service, open(path, 'rb'),
476476
{
477477
'Accept': responseMimeType,
478-
'Content-Disposition': make_content_disposition_header(path)
478+
'Content-Disposition': make_content_disposition_header(path.encode('utf-8') if type(path) is unicode_string else path)
479479
},
480480
verbose, tikaServerJar, config_path=config_path, requestOptions=requestOptions)
481481
if csvOutput == 1:

0 commit comments

Comments
 (0)