0

I'm scraping the web using a node wrapper for the Bing API. I print the text data from the results and I get some weird boxes with question marks inside of them. I've tried using escape and decodeURIComponent, but it's not getting rid of the symbols. What sort of encoding knowledge should I know to fix this?enter image description here

Laurel
  • 5,965
  • 14
  • 31
  • 57
CuriousFellow
  • 225
  • 1
  • 3
  • 14

1 Answers1

0

I decided to use regex pattern to replace anything not in the ascii char range (0-127).

x = x.replace(/[^\x00-\x7F]/g, "");
CuriousFellow
  • 225
  • 1
  • 3
  • 14