在python中转换ascii字符

在python中转换ascii字符,python,salesforce,Python,Salesforce,我试图从salesforce中提取数据,但是在读取ascii字符时遇到了一些问题 salesforce数据库中的原始值 6 articles, plus 2 pieces of content labeled “expert answers” 我在python中获得的值 6 articles, plus 2 pieces of content labeled \u201cexpert answers\u201d 似乎双引号被转换为ascii。当我尝试在python str()方法中包装上

我试图从salesforce中提取数据,但是在读取ascii字符时遇到了一些问题 salesforce数据库中的原始值

 6 articles, plus 2 pieces of content labeled “expert answers”
我在python中获得的值

 6 articles, plus 2 pieces of content labeled \u201cexpert answers\u201d
似乎双引号被转换为ascii。当我尝试在python str()方法中包装上面的字符串时,它会抛出下面的错误

UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 45: ordinal not in range(128)

有没有办法把这个ascii码转换成原始值保存到数据库中?

这实际上叫做“unicode”,不是ascii码。哦,对不起,我的错!!但有没有办法将其转换回原始字符?请参见: