| 141 | |
| 142 | |
| 143 | std::string ToUTF8(std::wstring const & s) |
| 144 | { |
| 145 | int size = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), (int)s.size(), NULL, 0, NULL, NULL); |
| 146 | std::string converted; |
| 147 | converted.resize(size); |
| 148 | WideCharToMultiByte(CP_UTF8, 0, s.c_str(), (int)s.size(), converted.data(), (int)converted.size(), NULL, NULL); |
| 149 | return converted; |
| 150 | } |
| 151 | |
| 152 | |
| 153 | std::wstring FromUTF8(std::string const & s) |