title: CFStringRef from char* without providing encoding type
body: <p>I have a C string:</p>
  
  <pre><code>unsigned char* contents = readInFile(path); //sting bytes in some unknown NSStringEncoding encoding.
  </code></pre>
  
  <p>I want to know the current <code>NSStringEncoding</code> value of contents. I want to do this without using <code>NSString usedEncoding</code> methods.</p>
  
  <p>I need a <code>CFStringRef</code> from contents without introducting a new string encoding.</p>
  
  <pre><code>NSString* contentsString = [NSString stringWithCString:(char *)contents];
  </code></pre>
  
  <p>introduces default encoding so screws things up. How can a create a <code>CFStringRef</code> dirctly from contents?</p>
  
  <p>Once I have this I can:</p>
  
  <pre><code>CFStringEncoding cfStringEncoding = CFStringGetFastestEncoding((CFStringRef)contentsString);
  NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(cfStringEncoding);
  </code></pre>