QT tutorial Chinese garbled

Remember that time will be programmed with QT, fear most is the Chinese, after all kinds of garbage Baidu, no method to solve a variety of Google, then solve all the luck. Later, carefully thought for a moment, QT since cross-platform, that his Chinese character formatting will not be the GBXXX, linux and default on macOS Chinese encoding is not GBXXX, it seems that UTF8, then in order to guarantee no problem, it defaults to win in the coding should be UTF8. (of course, there is also access to the relevant information)

An experiment to test:
QT tutorial Chinese garbled
QT tutorial Chinese garbled

Not a problem, then take a look at the GB2312:
QT tutorial Chinese garbled
QT tutorial Chinese garbled
Then we are here to panic, all kinds of Google ah, ah Baidu may not be able to solve. In fact, this reminds me of JavaWeb often talked about the Chinese garbled, should be the same reason.

Of course, this only works for QTCreator the compiler, if you are using the VS, and then use a solution of VS, VS default is GB2312

Finally have time to come into contact with these two things intact comb it again, it was said to use to learn what what, what what to prepare in advance, and I want to say you are not familiar with this stuff, how could write a very short period of time good code, up to Bug is changed and changed, also complained about the needs of people mention the demand is sick.

Guess you like

Origin blog.51cto.com/11753138/2449444