encodig (1) 썸네일형 리스트형 [Python] UnicodeEncodeError: 'ascii' codec can't encode characters in position 4-6: ordinal not in range(128) 상황 python에서 DB에 저장하는데 unicode화 한 상태입니다. 문제 파악 unicode화 시킨 문자열이 인코딩이 제대로 되지 않아 발생했습니다. 해결 방법 unicode인 문자열을 'utf8'로 encode하면 text의 type은 unicode에서 str으로 변환이 되고, 출력을 할 수 있습니다. 이전 1 다음