title: Convert wchar_t to int
body: <p>how can I convert a <code>wchar_t</code> (<code>'9'</code>) to a digit in the form of an <code>int</code> (<code>9</code>)?</p>
  
  <p>I have the following code where I check whether or not <code>peek</code> is a digit:</p>
  
  <pre><code>if (iswdigit(peek)) {
      // store peek as numeric
  }
  </code></pre>
  
  <p>Can I just subtract <code>'0'</code> or is there some Unicode specifics I should worry about?</p>