I am trying to encrypt the the file with filename which has international characters. for eg : "abc_越智プロファイルーwork.docx" using below code. But it fails. I am running the below code in Windows.
#Code
import gnupg
gpg = gnupg.GPG(gpgbinary="C:/Program Files (x86)/Gnu/GnuPG/gpg2")
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