UTF-8 encoding in "filename" parameter of "Content-Disposition" header

Hi! I’m using Seafile server in backend with web API. When I’m trying to POST new file in chunks, with “filename” parameter in “Content-Disposition” header, and filename in latin symbols, everything works good.
But when “filename” contains cyrillic symbols, server returns UnicodeEncodeError.
And here is the question, does Seafile Server supports something like rfc5987 standard, or any other that allows to use UTF-8 encoding in “filename” parameter? Or Seafile web API has another way to upload new file in chunks, without using “Content-Disposition” header, having ability to set file name in curl query?
Any other curl queries, that are not using “Content-Disposition” header (for example creating new repos), are perfectly working with UTF-8.
I have no idea to make it work the way I need.
Thanks a lot!

Hello @slip686 , can you replace special characters in string using the %xx escape? You can use urllib.parse.quote of python to replace filename.

Hi @feiniks! Thanks for your answer! Yes, it works with quoted ‘filename’ parameter. Also, in python ‘Content-Disposition’ header should look like this:
‘Content-Disposition’: f ’ ’ ‘attachment; filename*=UTF-8’ ’ “{filename}” ’ ’ ‘.
This weird syntax is important: filename*=UTF-8’ ’