I am developing a simple console
application with Visual Studio 2013
int _tmain(int argc, _TCHAR* argv[])
{
std::wstring name;
std::wcout << L"Enter your name: ";
std::wcin >> name;
std::wcout << L"Hello, " << name << std::endl;
system("pause");
return 0;
}
If I enter as input Ángel
the application works well and the output is
Hello, Ángel
the problem is that If i put a breakpoint on
std::wcout << L"Hello, " << name << std::endl;
the Visual studio debugger shows
+ name L"µngel" std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >
Although the output in console is correct in other part of the program I have a call to win32api
function CopyFileW()
and it always fails because the path has the substring Ángel
and the substring passed to function is transformed to µngel