Created
January 25, 2016 09:01
-
-
Save leehosung/36e09b25d6f9cd5f3016 to your computer and use it in GitHub Desktop.
escape unicode of dumped data by Django
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
# python ./manage.py dumpdata eight.Kcb020BadCode --indent=2 | python unicode_escape.py | |
import sys | |
import codecs | |
decoder = codecs.getdecoder('unicode_escape') | |
for line in sys.stdin.readlines(): | |
print((decoder(line))[0], end='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment