no longer use utf-8 encoding bc it causes encoding issues (waow) with some emails?

This commit is contained in:
revsuine 2024-11-05 17:14:44 +00:00
parent 51c0ea34a7
commit 9c5567addf
Signed by: revsuine
GPG key ID: 3F257B68F5BC9339

View file

@ -69,7 +69,7 @@ def encrypt(
return message.as_string() return message.as_string()
gpg = gnupg.GPG() gpg = gnupg.GPG()
gpg.encoding = 'utf-8' # default is latin-1 which fails w some unicode chars # gpg.encoding = 'utf-8' # default is latin-1 which fails w some unicode chars
encrypted_content = gpg.encrypt(message.as_string(), recipients, armor=True) encrypted_content = gpg.encrypt(message.as_string(), recipients, armor=True)
if not encrypted_content: if not encrypted_content:
raise ValueError(encrypted_content.status) raise ValueError(encrypted_content.status)