title: Empty output after converting string to wstring or vice-versa
body: <p>ascii string Forlì</p>
  
  <p>and using the below loop</p>
  
  <pre><code>string s = "Forlì";
  for(size_t i = 0; i &lt; s.size(); i++) {
      printf("% d", s[i]);
  }
  
  wstring s = L"Forlì";
  
  for(size_t i = 0; i &lt; s.size(); i++) {
      printf("% d", s[i]);
  }
  </code></pre>
  
  <p>this is what I get</p>
  
  <pre><code>70 111 114 108 -61 -84    //string
  70 111 114 108 236        //wstring
  </code></pre>
  
  <p>Now I want to convert between these types without changing whatever values they are printing above(not some different encoding). Since I'm not using windows or c++11, i found the below routines which gives me unsatisfactory results</p>
  
  <pre><code>std::wstring s2ws(const std::string&amp; s) {
      const char* _Source = s.c_str();
      size_t _Dsize = mbstowcs(NULL, _Source, 0) + 1;
      wchar_t *_Dest = new wchar_t[_Dsize];
      wmemset(_Dest, 0, _Dsize);
      mbstowcs(_Dest,_Source,_Dsize);
      std::wstring result = _Dest;
      delete []_Dest;
      return result;
  }
  
  std::wstring s2ws(const std::string&amp; s) {
      wstring w;
      w.assign(s.begin(), s.end());
      return w;
  }
  </code></pre>
  
  <p>When I print the converted string using 1st routine it does not output anything while the second routine does not convert it to wstring(the -61,-84 do not get changed to 236).</p>
  
  <p>How can I do this conversion properly? even an algorithm to manipulate those numbers without any library function will suffice...</p>