forked from redis/hiredis-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to control how unicode decoding errors are handled
Adds an errors argument to Reader objects to be used in conjunction with the encoding argument. Valid values for errors are 'strict' (the default), 'replace', 'ignore', or 'backslashreplace'. These four values are defined by Python: https://docs.python.org/3/howto/unicode.html#the-string-type Note this is a backwards incompatible change. Prior to this change hiredis-py would silence UnicodeDecodeErrors and return the original bytes object. After this change, the default behavior is to raise the UnicodeDecodeError when a decoding error is encountered. This matches Python's default behavior. The user can alter the default behavior by specifying a different value to errors just like normal Python.
- Loading branch information
1 parent
283b7b9
commit c27b463
Showing
4 changed files
with
57 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters