I have tried to display URL(contain unicode characters) response in Message Box.
But garbage characters displaying, so that i tried to made different conversions, but alphabits only displaying remaining unicode characters displaying as ?(or)garbage values.
im trying this from 7 days..plz help me...im very new to coding plz write the complete code.
HINTERNET hInternet = InternetOpen( _T(""), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 );
HINTERNET hConnect = InternetConnect( hInternet, L"http://xxxxxxxxxx.com", INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1);
DWORD options = INTERNET_FLAG_NEED_FILE|INTERNET_FLAG_HYPERLINK|INTERNET_FLAG_RESYNCHRONIZE|INTERNET_FLAG_RELOAD;
HINTERNET hRequest = InternetOpenUrl(hInternet, L"http://xxxxxxxxxxx.com/c.php?varname=artxt&text=يبتىلمينبىمنيبغعاanand123", NULL, 0, options, 0);
TCHAR buffer[100];
DWORD bytesRead;
InternetReadFile(hRequest, buffer,100, &bytesRead);
MessageBoxW(NULL,ATL::CA2W(buffer),L"Check",MB_OK);
}
InternetCloseHandle(hRequest);
InternetCloseHandle(hConnect);
when i added below code:
HttpQueryInfo (hRequest,HTTP_QUERY_RAW_HEADERS_CRLF, (LPVOID) lpHeadersA,
&dwSize, NULL);
MessageBoxW(NULL,(LPWSTR)lpHeadersA,L"Type",MB_OK);
It giving output:
HTTP/1.1 200 OK
Date: Mon, 05 Nov 2012 03:55:10 GMT
Server: Apache
Keep-Alive: timeout=5, max=74
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html