Created
January 21, 2014 18:40
-
-
Save raghothams/8545659 to your computer and use it in GitHub Desktop.
Python Unicode conversion error
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
# Solving unicode to ascii conversion error | |
str1 = '\xc6\xe5\t\xc5\xba\xc6;\xe4y\xdf8\xd8U\xcb\xff\xaaT@\r&\x8c\xbd\x95v' | |
print type(str1) | |
str_in_ascii = str1.encode('base-64') | |
print type(str_in_ascii) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment