Skip to content
  • poljar's avatar
    2f5590bf
    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.
    2f5590bf
    olm: Allow decryption functions to define how to handle unicode decode errors.
    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.
Loading