title: wcstombs strange behaviour
body: <p>For some reason wcstombs cuts of everything from 1st occurrence of russian named folder in fileName.My VS project is unicode.</p>
  
  <p>here is my code:</p>
  
  <pre><code>bool func( const TCHAR* fileName)
  {
      #ifdef _UNICODE
          char path[MAX_PATH];
          wcstombs(path, fileName, ARRAYSIZE(path));
      #else
          const char* path = strFileName;
      #endif
  </code></pre>
  
  <p>I think the problem in russian names of folder in paths, for example </p>
  
  <blockquote>
    <p>D:\Новая папка\file.dat</p>
  </blockquote>
  
  <p>turns into</p>
  
  <blockquote>
    <p>D:\</p>
  </blockquote>
  
  <p>but</p>
  
  <blockquote>
    <p>D:\test folder\file.dat</p>
  </blockquote>
  
  <p>works fine.</p>
  
  <p>maybe setlocale is solution?</p>
  
  <p>also this code works but I don't know if it best solution in my case.</p>
  
  <pre><code>CT2CA path(fileName);
  </code></pre>