파이선21 [파이선2] 파이선2의 한글 인코딩 비교하기 > 한글 >> 한글 # 서로다른 타입에 대한 확인 print type(h1) print type(h2) >> >> # 리스트에 추가후 출력 str_list = [] str_list.append(h1) str_list.append(h2) print str_list >> ['\xed\x95\x9c\xea\xb8\x80', u'\ud55c\uae00'] ''' # UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal 오류 발생 if h1 == h2: print True ''' ''' # UnicodeDecodeError: 'ascii' codec .. 2015. 1. 12. 이전 1 다음