开发者

Qt Encoding Questions

开发者 https://www.devze.com 2023-02-16 03:58 出处:网络
I am writing a Qt program in windows with international support. The code looks like this: QTextCodec *p = QTextCodec::codecForName(\"GBK\");

I am writing a Qt program in windows with international support. The code looks like this:

QTextCodec *p = QTextCodec::codecForName("GBK");

When the program runs on GBK-local machines, it works just fine, but with a non-GBK environment, p always has the value of NULL. I am sure that the target environment has the GBK code-p开发者_StackOverflow中文版age installed.

Why is this happening? thanks.


The code for the GBK-codec is in qcncodecs4.dll, which is located in the codecs plugin directory. Your deployed program has to find this plugin: See my answer to the Question Qt dll deployment on windows

0

精彩评论

暂无评论...
验证码 换一张
取 消