I request a web page using CCHttpRequest
then when I print the received response with CCString
I can see turkish characters without any problems but when I assign the received response using std::string
and print in CCLog
strange characters come up. How can I fix this?
std::vector<char> *buffer = response->getResponseData();
char jenny [buffer->size()];
for (unsigned int i = 0; i < buffer->size(); i++)
{
jenny[i] = (*buffer)[i];
}
CCString* uStr = CCString::createWithContentsOfFile(jenny);
string wStr(jenny);
CCLog("%ls", &wStr);
CCString Response : Get data from file(< ?xml version="1.0" encoding="utf-8"?> < string xmlns="http://tempuri.org/" > Gönderildi < / string >
string CCLog Response : ����k�4p�