title: Cannot get the correct data out of a file using stringWithContentsOfFile
body: <p>I haven been working on this problem for a couple of hours but I still could not get it worked. I have tried all the solutions I found on stackoverflow but nothing worked. The following is my code:</p>
  
  <pre><code>- (void)viewDidLoad {
  [super viewDidLoad];
  
  // Do any additional setup after loading the view.
  NSFileManager *fileManager;
  NSString *currentPath;
  NSString *content;
  content = [[NSString alloc] init];
  
  NSString *filename;
  filename = @"/Tasty Noodle House.xlsx";
  
  fileManager = [NSFileManager defaultManager];
  currentPath = [fileManager currentDirectoryPath];
  
  NSError*  error;
  content = [NSString stringWithContentsOfFile:[currentPath stringByAppendingString:filename] encoding:NSUTF16LittleEndianStringEncoding error:&amp;error];
  
  NSLog(@"current path: %@",currentPath);
  NSLog(@"filecontent: %@",content);
  NSLog( @"error: %@", error );
  </code></pre>
  
  <p>}</p>
  
  <p>I have checked that the path is correct and the file did exist in that path(currentPath). However, the problem is that the line NSLog(@"filecontent: %@",content); is not printed out at all. The printout looks like the following:</p>
  
  <pre><code>2016-01-23 11:30:11.367 ScaryBugsMac[1377:222946] current path: /Users/username/Library/Developer/Xcode/DerivedData/ScaryBugsMac-buobqwjccigdqthjejrzmgasnzyf/Build/Products/Debug
  2016-01-23 11:30:11.367 ScaryBugsMac[1377:222946] error: (null)
  </code></pre>
  
  <p>Based on my experience, it should print out at least "filecontent: (null)".But it is really weird nothing get printed out.</p>
  
  <p>I have also tried using the enconding: <strong>NSUTF8StringEncoding</strong>, it gave me the error:</p>
  
  <pre><code>2016-01-23 11:32:44.708 ScaryBugsMac[1404:230157] current path: /Users/username/Library/Developer/Xcode/DerivedData/ScaryBugsMac-buobqwjccigdqthjejrzmgasnzyf/Build/Products/Debug
  2016-01-23 11:32:44.708 ScaryBugsMac[1404:230157] filecontent: (null)
  2016-01-23 11:32:44.709 ScaryBugsMac[1404:230157] error: Error Domain=NSCocoaErrorDomain Code=261 "The file “Tasty Noodle House.xlsx” couldn’t be opened using text encoding Unicode (UTF-8)." UserInfo=0x60000007a740 {NSFilePath=/Users/username/Library/Developer/Xcode/DerivedData/ScaryBugsMac-buobqwjccigdqthjejrzmgasnzyf/Build/Products/Debug/Tasty Noodle House.xlsx, NSStringEncoding=4}
  </code></pre>
  
  <p>Two other things:</p>
  
  <ol>
  <li><p>I have tried all the encodings and the problem falls into one of the two cases above.</p></li>
  <li><p>I could open the xlsx file using Excel on my Mac without any problem. So I don't think there is anything wrong with the file.</p></li>
  </ol>
  
  <p>I would really appreciate any help, thank you!</p>