What is QString::toUtf8 doing?

后端 未结 2 379
梦毁少年i
梦毁少年i 2021-01-17 09:13

This may sounds like a obvious question, but I\'m missing something about either how UTF-8 is encoded or how the toUtf8 function works.

Let\'s look at a very simple

2条回答
  •  余生分开走
    2021-01-17 10:04

    Running your code I get expected result

    "4dc3bc6c6c6572"

    I think the problem is with your input not output. Check the encoding of your source file and look at void QTextCodec::setCodecForCStrings ( QTextCodec * codec ) [static]

提交回复
热议问题