1. 19 Jun, 2019 1 commit
    • poljar's avatar
      _compat: Change the to_native_str into a to_unicode_str function. · 5e24c605
      poljar authored
      The to_native_str function was supposed to produce Unicode decoded
      native strings for python2 and python3.
      Upon further consideration this doesn't make much sense since under
      python2 it would need to decode the bytes into a Unicode string and turn
      it back into a python2 str.
      The ability to use the replacement character requires us to use a
      Unicode string under python2 as well.
  2. 18 Jun, 2019 1 commit
    • poljar's avatar
      olm: Allow decryption functions to define how to handle unicode decode errors. · 2f5590bf
      poljar authored
      This patch changes the decryption functions not to fail if there was an
      unicode decode error while converting the decrypted bytes plaintext into
      a native python string.
      Characters that cannot be decoded as unicode are now replaced with the
      unicode replacement character (U+FFFD).
      The old behaviour of raising an UnicodeDecodeError can be achieved by
      passing the "strict" error handling scheme to the decrypt function.
  3. 12 Apr, 2019 1 commit
  4. 08 Apr, 2019 2 commits