jay
jay

Reputation: 1071

Qt Encoding Questions

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-page installed.

Why is this happening? thanks.

Upvotes: 3

Views: 600

Answers (1)

hmuelner
hmuelner

Reputation: 8221

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

Upvotes: 2

Related Questions