| 84 | } |
| 85 | |
| 86 | wstring StringToWString(UINT codePage, const string& s) |
| 87 | { |
| 88 | if (s.empty()) |
| 89 | return wstring(); |
| 90 | // get a converted string length |
| 91 | int len = MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), NULL, 0); |
| 92 | wstring out(len, 0); |
| 93 | MultiByteToWideChar(codePage, 0, s.c_str(), s.length(), &out[0], len); |
| 94 | return out; |
| 95 | } |
| 96 | |
| 97 | string WideToCurrentCP(const wstring& ws) |
| 98 | { |
no test coverage detected