title: Python: Reading Ftp file list with UTF-8?
body: <p>Hi I am using module ftplib. And list my files with this code:</p>
  
  <pre><code>files=[]
  files = ftp.nlst()
  </code></pre>
  
  <p>And write them to text file with this code:</p>
  
  <pre><code>for item in files:
      filenames.write(item +'\n')
  </code></pre>
  
  <p>But there is an encoding problem that if my file name has 'ı,ğ,ş' characters, It cant read this and writes to file with '?' instead.</p>
  
  <p>How can read them properly?</p>