Closed ReneVolution closed 7 years ago
In https://github.com/omemo/python-omemo/blob/master/src/omemo/aes_gcm.py#L37 we should use
.encode('utf-8')
Hi, I don't have the time to actively develop this, but patches are welcome and will be reviewed and accepted by me.
Fixed.
Whenever i try to encrypt german umlauts, it runs into UnicodeEncodeError.
02/01/2017 22:26:11: stderr: ERR: File "/usr/local/lib/python2.7/dist-packages/omemo/state.py", line 279, in create_msg 02/01/2017 22:26:11: stderr: ERR: (key, iv, payload) = encrypt(plaintext) 02/01/2017 22:26:11: stderr: ERR: File "/usr/local/lib/python2.7/dist-packages/omemo/aes_gcm.py", line 37, in encrypt 02/01/2017 22:26:11: stderr: ERR: encoded_plaintext = padding_add(plaintext).encode() 02/01/2017 22:26:11: stderr: ERR: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 28: ordinal not in range(128)