- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using the Max 2025 SDK with Qt 6 and VS 2019. I want to get the name of an INode* type and output it using qDebug(), but the output is always garbled. How can I solve this?
I am using GB2312 encoding in VS2019, and I want to display the name of an INode* on a Qt-made UI, but it is also showing as garbled text.
INode* node=ip->GetSelNode(0)->GetName();
qDebug() << QString::fromWCharArray(node->GetName());
MSTR name(node->GetName());
qDebug() << name.operator QString();
MSTR t = node->GetName();
std::wstring tt = t.data();
qDebug()<< QString::fromStdWString(tt);c
qDebug() << QString::fromUtf8(QString::fromWCharArray(node->GetName()).toUtf8());
The result of the above four output methods is(in vs console output window):
"䕨\u0A12翶"
"䕨\u0A12翶"
"䕨\u0A12翶"
"䕨\u0A12翶"
Solved! Go to Solution.