title: Check if NSData contains ASCII or UTF8 Encoding
body: <p>I am retrieving HTML, containing UTF8 or ASCII encoded text. For most common use it is ASCII decoding that works to display the text right:</p>
  
  <pre><code>NSString *responseString    =   [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding];
  </code></pre>
  
  <p>Now I have another HTML page with UTF8 encoding, so I have to use:</p>
  
  <pre><code>NSString *responseString    =   [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
  </code></pre>
  
  <p>What kind of encoding I retrieve is random when loading websites. My question is, is there a way to check the NSData for what kind of decoding is the right to use? So I know which encoding type I need to use.</p>
  
  <p>Thnx!</p>