I have txt file whose contents are:
\\u041f\\u0435\\u0440\\u0432\\u044b\\u0439_\\u0438\\u043d\\u0442\\u0435\\u0440\\u0430\\u043a\\u0442\\u0438\\u0432\
Check this code :) Windows SDK has it already for you, MS geeks thought for this too, you can find more details in this post: http://weblogs.asp.net/kennykerr/archive/2008/07/24/visual-c-in-short-converting-between-unicode-and-utf-8.aspx
#include
#include
#define ASSERT ATLASSERT
int main()
{
const CStringW unicode1 = L"\u041f and \x03A9"; // 'Alpha' and 'Omega'
const CStringA utf8 = CW2A(unicode1, CP_UTF8);
ASSERT(utf8.GetLength() > unicode1.GetLength());
const CStringW unicode2 = CA2W(utf8, CP_UTF8);
ASSERT(unicode1 == unicode2);
return 0;
}
This code has been tested by me and it works fine.