title: Check if UTF-8 is wchar_t or char?
body: <p>I'm calling zlib API <code>zipOpen</code> which create a new zip file from my C++ project. The function signature is 
  <code>extern zipFile ZEXPORT zipOpen (const char* pathname, int append)</code>. </p>
  
  <p>This call eventually call <code>fopen</code> in order to create the file. However, this function doesn't support wide characters, and I'd like to fix it by sending a UTF-8 format (that represented by char* and fit function signature) and before calling <code>fopen</code> check if the string contain non ascii characters, if no, call <code>fopen</code> as before. if yes, convert to wide string (wchar_t) and call <code>_wfopen</code>. </p>
  
  <p>So the question is if there's an C/C++ API that check if UTF-8 formatted string contain non ascii characters ?</p>
  
  <p>Basically I'm looking for a function resembles to <code>isWide</code> in the example below.
  I'd like to know whether to call <code>fopen</code> or <code>_wfopen</code> from Windows api with the string represented filename. </p>
  
  <pre><code>    std::string toUTF8(std::wstring str)
      {
          std::wstring_convert&lt;std::codecvt_utf8&lt;wchar_t&gt;&gt; converter;
          return converter.to_bytes(str));
      }
      ...
      ..
      .
      std::wstring s1 = L"おはよう";
      isWide(toUTF8(s1).c_str()); //this should return true.
  
      string s2 = "asdasd";
      isWide(s2); //this should return false. 
  
      std::wstring s3 = L"asdasd";
      isWide(toUTF8(s3)); //this should return false.
  
      for s in s1,s2,s3 do : //pseudo code, please forgive me :-) 
          if (isWide(toUTF8(s)))
              _wfopen(s,L"wb"); // create wide char file
          else
              fopen(s,"wb"); // create regular name file
  
  </code></pre>
  
  <p>and the function signature of isWide :</p>
  
  <pre><code>bool isWide(char * s);
  </code></pre>
  
  <p>As stated in the comment below, a similar question was already asked before, but wasn't resolved with standard API. </p>
  
  <p>thanks </p>