python error1 UnicodeEncodeError: 'ascii' codec can't encode characters in position : ordinal not in range(128) 원인 : Python은 기본 8bits char를 가정한다. string내부에 2byte character가 있는경우 에러 발생한다. 해결 : .encode("ENCODE_TYPE") 를 스트링 뒤에 붙이면 된다. (ex) fpout.write( str.encode("utf-8") ) 2011. 6. 17. 이전 1 다음