title: Base64 decode a string with ISO-8859-1 charset and save it into NSData
body: <p>This is what I've now:</p>
  
  <pre><code>documentData = new NSData (document.String, NSDataBase64DecodingOptions.None);
  </code></pre>
  
  <p>This does work, but it seems that NSData is using UTF-8 as output charset. But I need the data in ISO-8859-1 output charset to get the correct decoding. The default one (UTF-8) fails.</p>
  
  <p>Is there an option for <code>NSData</code> or do I have to convert it with C#?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Can I assume that ASCII is ISO-8859-1?</p>
  
  <pre><code>public static string Base64Decode(string base64EncodedData) {
      if (String.IsNullOrEmpty (base64EncodedData))
              return null;
  
      var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
      return System.Text.Encoding.ASCII.GetString(base64EncodedBytes);
  }
  </code></pre>
  
  <p>I believe not.</p>