So I was trying to use 'ZERO WIDTH SPACE' (U+200B)
in my Qt 4.8 compiled with MSVC 9.0 project and encountered a problem:
// This works
QString::fromUtf8("TestString"); // Note the zero width space in between the words
// This prints a '?'
QString::fromUtf8("Test\u200BString");
Is there a reason this happens, is this a known bug? Am I overlooking something? Testing the same with Qt 5.6 works flawlessly.
Edit:
// This also works with Qt 4.8
QString::fromUtf8("Test%1String").arg(QChar(0x200b));
As @Scheff's Cat mentioned, this seems to imply the problem isn't Qt but msvc 9.0 can't handle '\u200B'. I will investigate this further and keep this question updated.