I am new to c++, I am trying to print some values on console. I am using below code for this
std::cout << "text : " << text.latin1().data() <<endl;
text.latin1().data()
returns a char*
to me.
It works fine as long as values are normal ASCII but it prints "?" for special characters like alpha, beta and gamma (may be for utf-8).
text is WTF::String latin1 is WTF::CString and data is char*
How can I get the unicode values for the given char*
and print their string values instead of "?".
Thanks