In QT 5.4 and C++ I try to decode a string that has unicode entities.
I have this QString:
QString string = \"file\\u00d6\\u00c7\\u015e\\u0130\\u011e
Qt provides a macro called QStringLiteral for handling string literals correctly.
Here's a full working example:
#include
#include
int main(void) {
QString string = QStringLiteral("file\u00d6\u00c7\u015e\u0130\u011e\u00dc\u0130\u00e7\u00f6\u015fi\u011f\u00fc\u0131.txt");
qDebug() << string;
return 0;
}
As mentioned in the above comments, you do need to print to a console that supports these characters for this to work.