All pastes #161537 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-09-05 15:08 UTC
rendered paste body
int main(int argc, char* argv[])
{
	wchar_t caca[] = L"this is a test";
	char caca2[] = "this is a test";
	wchar_t pipi[1024];
	
	wchar_t buf[20];
	int ret=MultiByteToWideChar(CP_ACP,0,"ÄÖÜäöüß",-1,buf,20);
	
	MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, (char *) caca, -1, pipi, 1024);
	printf("caca -> %S", pipi);
	int err = GetLastError();
	
	MultiByteToWideChar(CP_ACP, MB_COMPOSITE, (char *) caca2, -1, pipi, 1024);
	printf("caca2 -> %S", pipi);
	
}