Home > Mobile >  About a QString gibberish
About a QString gibberish

Time:09-25

Now is Qt vc compiler,
Probably process is as follows:

<1> QString STR=input GBK code strings, such as "GBK original string" ;//no special transformation directly enter

Behind the STR as parameters passed in
<2> The setText (STR) garbled

Reason is that the program run to & lt; 1> When "GBK original string" default to utf8 decoding, then identify the error garbled characters is understandable,

But now the question is:

In the second step & lt; 2> At this point is there any way to STR to "GBK original string" then explicitly on the window [less at & lt; 1 & gt; where a QString: : from coding () this, this I know],

Tried several transformation, I found that a little problem,
I suspect that in & lt; 1> Initialization time assignment, or construction, whether the STR does not receive and save "GBK original string" the original code,
Because I stil explicitly for??? Will directly toGBK promise for kun jins kao, seems to be the original code or lost, or be changed?

Hope BBS friend for me, thank you,
  •  Tags:  
  • Qt
  • Related