Python3 中使用cx_oracle模块执行sql报错 UnicodeEncodeError: 'ascii'
代码编码为utf-8,print编码为utf-8,数据插入数据库报错
UnicodeEncodeError: 'ascii' codec can't encode character '\u200e' in position 254: ordinal not in range(128)
解决方法:
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
网友评论