这个是 Mailgun 给我的回复,貌似他们也遇过这问题然后解决不了…
Hello xxx,
Thank you for the update and clarification!
I first came across this issue a couple of years ago, and unfortunately, I still have not been able to find a solution with Python.
The issue stems from how Python attempts to handle Unicode and byte strings. Python has been the only language I've struggled with this matter. The only solution would be to use the ASCII equivalent of the filename and submit the data with the POST request.
Reference:
https://stackoverflow.com/questions/20591599/why-arent-post-names-with-unicode-sent-correctly-when-using-multipart-form-data I apologize for any inconvenience this may cause. Let us know if you have any questions.
Thank you,
Marco@MG