title: readline() returns a character at a time
body: <p>I am using Python 3.6.4 on Windows 10 with Fall Creators Update. I am attempting to read a XML file using the following code:</p>
  
  <pre><code>with open('file.xml', 'rt', encoding='utf8') as file:
      for line in file.readline():
          do_something(line)
  </code></pre>
  
  <p><code>readline()</code> is returning a single character on each call, not a complete line. The file was produced on Linux, is definitely encoded as UTF8, has nothing special such as a BOM at the beginning and has been verified with a hex dump to contain valid data. The line end is <code>0x0a</code> since it comes from Linux. I tried specifying <code>-1</code> as the argument to <code>readline()</code>, which should be the default, without any change in behavior. The file is very large (>240GB) but the problem is occurring at the start of the file.</p>
  
  <p>Any suggestions as to what I might be doing wrong?</p>