Details
Description
QApplication.arguments() assumes that the arguments are encoded in the system locale and converts them to UTF-8. However, all Python 3 strings are already UTF-8 encoded, which leads to Qt mangling arguments if the argument has characters that are encoded differently in the system locale than in UTF-8.
E.g. on systems using ISO-8859-1 we get the same as if we did:
"รค".encode("UTF-8").decode("ISO-8859-1")
Setting QTextCodec.codecForLocale to UTF-8 is a workaround but given that all strings in Python 3 are UTF-8, that should probably not be necessary.