본문 바로가기
Coding/Python

파이썬 한글 인코딩 문제 해결

by Hide­ 2016. 12. 8.
반응형

>>> t = (('테스트',100),('한글',200))

>>> t

(('\xed\x85\x8c\xec\x8a\xa4\xed\x8a\xb8', 100), ('\xed\x95\x9c\xea\xb8\x80', 200))

>>> print t

(('\xed\x85\x8c\xec\x8a\xa4\xed\x8a\xb8', 100), ('\xed\x95\x9c\xea\xb8\x80', 200))

>>> print repr(t).decode('string-escape')

(('테스트', 100), ('한글', 200))