0

I am trying to pull data from salesforce however facing some issues while reading ascii characters.For example Original value in salesforce db

 6 articles, plus 2 pieces of content labeled “expert answers” 

Value i get in python

 6 articles, plus 2 pieces of content labeled \u201cexpert answers\u201d 

Seems like double quotes are converted to ascii.When i try to wrap above string in python str() method it throws below error

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

Is there any way i can convert this ascii to original value to save it in my db?

3
  • 1
    that's actually called "unicode", not ascii. Commented Mar 23, 2016 at 19:18
  • ohh sorry, my bad!!but is there any way to convert this back to original characters? Commented Mar 23, 2016 at 19:23
  • see this: stackoverflow.com/questions/3224268/python-unicode-encode-error Commented Mar 23, 2016 at 19:25

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.