curl-library
RE: getinmemory.c sample crashes with TCHAR
From: Itamar Syn-Hershko <itamar_at_divrei-tora.com>
Date: Mon, 13 Nov 2006 20:07:49 +0200
Date: Mon, 13 Nov 2006 20:07:49 +0200
> ... So I think it is much easier to use a
> single-byte index for your buffer, and typecast/convert the
> buffer to multibyte when needed.
>
> - Jeff
>
If I'm not wrong, casting the char* to wchar_t* won't just make it
multi-byte by itself. I tried that now and the non-standard characters I use
are still not visible. I used those lines of code for casting (I had no idea
what else to use):
wchar_t* pTemp = new wchar_t[chunk.size];
pTemp = (wchar_t*)chunk.memory;
szData.Format(_T("%S"), pTemp);
Shouldn't I use CharToOem or something?
Itamar.
Received on 2006-11-13