Created
July 17, 2018 16:41
-
-
Save h3nryza/cfb09720085ac1230a96b181156721e6 to your computer and use it in GitHub Desktop.
Unicode to string (fix to coercing unicode to string error
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
uni = u'some unicode' | |
string = uni.encode("utf-8") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment