Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Olm
Olm
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • matrix-org
  • OlmOlm
  • Merge Requests
  • !4

Merged
Created Jun 18, 2019 by poljar@poljarMaintainer

Python unicode decode errors when decrypting.

  • Overview 24
  • Commits 10
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: python/unicode_decode_errors