Why does string sometimes is written in one direction, sometimes in another?
This is code:
byte bytes[] = {0x2e, 0x20, 0x65, 0x00, 0x74, 0x00, 0x61, 0x00, 0x64,
0x00, 0x70, 0x00, 0x75, 0x00, 0x67, 0x00};
std::wstring s;
s.resize( 8 );
memcpy( &s[0], bytes, 16 );
_tprintf( _T("key: %s\n"), s.c_str());
MessageBox ( 0, s.c_str(), _T(""), 0 );
The result in message box is gupdate in in console ?etadpug.
I think it is with encoding. Does 0x2e20 or 0x202e mean something?
No comments:
Post a Comment