How can I get text encoding system explicitly in Qt? -


it's easy turn string qtextcodec * following:

char *str = "utf-8"; qtextcodec *codec = qtextcodec::codecforname(str); 

but can inverse? example:

qtextcodec *codec = qtextcodec::codecforname("system"); 

but how can turn codec string know encoding system utf-8/utf-16 or others?

but how can turn codec string know encoding system utf-8/utf-16 or others?

by using qtextcodec::name() const.

char *str = "utf-8"; qtextcodec *codec = qtextcodec::codecforname(str); qbytearray name = codec->name(); //  "utf-8" 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -