Qt coding issues

I am writing a Qt program in windows with international support. The code is as follows:

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

When a program runs on GBK-local machines, it runs fine, but with a non-GBK environment, p is always NULL. I am sure that the GBK code page is installed in the target environment.

Why is this happening? thank.

+3
source share
1 answer

The code for the GBK codec is located in qcncodecs4.dll, which is located in the codec plugin directory. Your deployed program should find this plugin: see my answer to the question of deploying Qt dll in windows

+2
source

All Articles