Please share the code in plain text (insert as code snippet in Markdown for formatting), not as screenshots to show respect to other users on the forum.
Make sure that your std::string filename contains UTF-8 string, not some locale encoding. Share the code where this parameter is initialized to get more hints what could be broken there.
Everything worked, I just changed it std::string filename to the QString filename.
And IFSelect_ReturnStatus aStat = aWriter.Write (filename.toStdString().c_str());
Fri, 12/20/2024 - 07:26
Please share the code in plain text (insert as code snippet in
Markdown
for formatting), not as screenshots to show respect to other users on the forum.Make sure that your
std::string filename
containsUTF-8
string, not some locale encoding. Share the code where this parameter is initialized to get more hints what could be broken there.Fri, 12/20/2024 - 08:10
Sorry, I'll add the code later, for some reason it is inserted incorrectly. Now I'll try to check what you advised about the encoding.
Mon, 12/23/2024 - 06:05
Mon, 12/23/2024 - 06:38
Everything worked, I just changed it std::string filename to the QString filename.
And IFSelect_ReturnStatus aStat = aWriter.Write (filename.toStdString().c_str());
Mon, 12/23/2024 - 07:32
Wouldn't make much difference, but
QString::toUtf8()
might look more explicit: