0

I need to read data from an external source, which is from MS.

As you know, MS likes to embed binary to simple text, so sometimes I run into trouble when I encounter such issue:

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

So my goal is, instead of this error, I want the text to be output to stdout anyway, but with all these wrong characters turned into white space.

Any idea how to do this? I hope it's not gonna be catch exception and a for loop to manually change it.

Paradox
  • 4,473
  • 8
  • 39
  • 84
Jason Hu
  • 6,049
  • 1
  • 18
  • 36

0 Answers0