1

I'm trying to scrape some content from a website, which usually works perfectly fine. This time, however, when scraping the content I get a load of characters, little diamonds with question marks.

Both the website I'm scraping from and my own website are using UTF-8 as encoding. The strange thing is, that I can scrape the homepage of that site perfectly fine, but whenever I try to scrape a different page, it all get's messed up, even though these pages are using UTF-8 as well. To keep things simple I've only called file_get_html() and after that a simple echo $html->plaintext so there should be no errors in my coding.

Does anyone know how to solve this? Thanks in advance

3
  • Post some of the unwanted characters you're getting. Commented May 27, 2012 at 19:51
  • How are you verifying that the page is encoded in utf-8? Commented May 27, 2012 at 19:52
  • 1
    see answer here: stackoverflow.com/questions/12488111/… Commented Feb 27, 2014 at 19:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.