Fix: Exception when printing models with Unicode characters #36#1
Open
jscarpaciCB wants to merge 1 commit into
Open
Fix: Exception when printing models with Unicode characters #36#1jscarpaciCB wants to merge 1 commit into
jscarpaciCB wants to merge 1 commit into
Conversation
…ck#36 Used codecs to fix issue with printing of characters such as below: AB8B7D5E808226F8E4279F6A779DCF2D -------------------------------------------------------------------------------- Size (bytes) : 878784 Signature Status : True Traceback (most recent call last): File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 38, in <module> sys.exit(main()) File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 26, in main print("%-20s : %s" % ('Product Name', binary.product_name)) File "C:\Python27\lib\encodings\cp437.py", line 12, in encode return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode character u'\xae' in position 2 8: character maps to <undefined>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Used codecs to fix issue with printing of characters such as below:
AB8B7D5E808226F8E4279F6A779DCF2D
Size (bytes) : 878784
Signature Status : True
Traceback (most recent call last):
File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 38,
in
sys.exit(main())
File "C:\Users\jscarpaci\PycharmProjects\untitled\binary_search.py", line 26,
in main
print("%-20s : %s" % ('Product Name', binary.product_name))
File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xae' in position 2
8: character maps to