Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Olm Olm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • matrix-orgmatrix-org
  • OlmOlm
  • Merge requests
  • !4

Python unicode decode errors when decrypting.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged poljar requested to merge python/unicode_decode_errors into master Jun 18, 2019
  • Overview 24
  • Commits 10
  • Pipelines 0
  • Changes 10

This patch-set implements the ability to let the library handle Unicode decode errors when decrypting a ciphertext that contains non-Unicode bytes.

Up until now decrypting such an ciphertext would raise a UnicodeDecodeError, to let users chose how they would handle such errors every decrypt function received a "unicode_errors" argument where library users can pick an error handling scheme as defined by the codecs module. The default error handling scheme is "replace" where characters that fail to decode are replaced with the unicode replacement character (U+FFFD)

  • The first patch adds a new to_native_str() function which handles the bytes -> str conversion.
  • The second patch replaces the bytes_to_native_str() function with the new to_native_str() function.
  • The third patch just adds an isort target to the Makefile.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: python/unicode_decode_errors