title: SWIFT: Reading file: NSData successful, String fails. Why?
body: <p>I'm trying to read large data from file. It is a text file. The following line is successful, data is read into memory:</p>
  
  <pre><code>if let data = NSData(contentsOfFile: path, options: NSDataReadingOptions(), error: &amp;error)
  </code></pre>
  
  <p>This line return an error:</p>
  
  <pre><code>if let data = String(contentsOfFile:path, encoding: NSUTF8StringEncoding, error: &amp;error)
  </code></pre>
  
  <p>But why? File is there, only Function is different. And I like to use second one, because I want to split all rows into separate strings in an array:</p>
  
  <pre><code>var array = data.componentsSeparatedByString("\n")
  </code></pre>
  
  <p>Any hint what to do?</p>
  
  <p>Additional information: There are german umlauts, so code is larger than 127. But the file was saved as UTF-8. How could I load/use non ascii text?</p>