title: R: readLines on a URL leads to missing lines
body: <p>When I <code>readLines()</code> on an <a href="https://www.imdb.com/search/title/?locations=Vancouver,%20British%20Columbia,%20Canada&amp;start=1.json" rel="nofollow noreferrer">URL</a>, I get missing lines or values. <a href="https://stackoverflow.com/questions/19275600/r-readlines-outputs-empty-lines">This might be due to spacing that the computer can't read</a>.</p>
  <p>When you use the URL above, CTR + F finds 38 instances of text that matches &quot;TV-&quot;. On the other hand, when I run <code>readLines()</code> and <code>grep(&quot;TV-&quot;, HTML)</code> I only find 12.</p>
  <p>So, how can I avoid encoding/ spacing errors so that I can get complete lines of the HTML?</p>