isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

international characters filename - not encrypting #280

Open devt20 opened 3 years ago

devt20 commented 3 years ago

I am trying to encrypt the filename which has international characters, for eg : "abc_越智プロファイルーwork.docx" using below code. But it fails.

#Code with open(r'C:\home\encryption\abc_越智プロファイルーwork.docx', "rb") as f: status = gpg.encrypt_file( file=f, symmetric='AES256', passphrase='abc@123', recipients=None, output=r'C:\home\encryption\abc_越智プロファイルーwork.docx.gpg', )

Error: gpg: can't create C:\home\encryption\abc_?????????work.docx.gpg': Invalid argument [GNUPG:] FAILURE symencrypt 33587248 gpg: symmetric encryption of[stdin]' failed: Invalid argument