Nominate our 2022 Qt Champions!

QProcess and Unicode Commands

  • Hi all,
    My Qt Application has a QProcess that I want to use to execute a command that includes some unicode characters. Unfortunately, these unicode characters seem to get replaced by question marks before the command is executed. What can I do?

    QProcess perl;
    perl.start("perl -CSDA "ཨོཾ་ཨཿ"");

    This is actually executed as "perl -CSDA "???"".

    Thank you!
    Best, Patrick

  • @patbangert Hi, I am having the same issue. Have you got any solution/workaround.
    Thanks in advance.

  • Moderators

    What platform are you on? QProcess passes the arguments in a platform specific way. It's UTF-16 on Windows and (usually but not always) UTF-8 on linux. You need to make sure the perl script treats them the same.

Log in to reply