#include <QtCore/QTextCodec>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QTextCodec


Public Types Index

enum ConversionFlag

DefaultConversion, ConvertInvalidToNull 0x80000000, IgnoreHeader 0x1, FreeFunction 0x2

Public Functions Index

virtual QList< QByteArray >aliases () const
boolcanEncode (QChar) const
boolcanEncode (const QString &) const
QByteArrayfromUnicode (const QString &uc) const
QByteArrayfromUnicode (const QChar *in, int length, ConverterState *state=0) const
QTextDecoder *makeDecoder () const
QTextDecoder *makeDecoder (ConversionFlags flags) const
QTextEncoder *makeEncoder () const
QTextEncoder *makeEncoder (ConversionFlags flags) const
intmibEnum () const =0
QByteArrayname () const =0
QStringtoUnicode (const QByteArray &) const
QStringtoUnicode (const char *chars) const
QStringtoUnicode (const char *in, int length, ConverterState *state=0) const

Static Public Functions Index

QList< QByteArray >availableCodecs ()
QList< int >availableMibs ()
QTextCodec *codecForCStrings ()
QTextCodec *codecForHtml (const QByteArray &ba)
QTextCodec *codecForHtml (const QByteArray &ba, QTextCodec *defaultCodec)
QTextCodec *codecForLocale ()
QTextCodec *codecForMib (int mib)
QTextCodec *codecForName (const QByteArray &name)
QTextCodec *codecForName (const char *name)
QTextCodec *codecForTr ()
QTextCodec *codecForUtfText (const QByteArray &ba)
QTextCodec *codecForUtfText (const QByteArray &ba, QTextCodec *defaultCodec)
voidsetCodecForCStrings (QTextCodec *c)
voidsetCodecForLocale (QTextCodec *c)
voidsetCodecForTr (QTextCodec *c)

Protected Functions Index

QTextCodec ()
virtual ~QTextCodec ()
QByteArrayconvertFromUnicode (const QChar *in, int length, ConverterState *state) const =0
QStringconvertToUnicode (const char *in, int length, ConverterState *state) const =0

Public Types


ConvertInvalidToNull 0x80000000
IgnoreHeader 0x1
FreeFunction 0x2

Public Functions

virtualQList< QByteArray > aliases ()

bool canEncode (

bool canEncode (

QByteArray fromUnicode (

QByteArray fromUnicode (

QTextDecoder * makeDecoder ()

QTextDecoder * makeDecoder (
  • ConversionFlagsflags)

QTextEncoder * makeEncoder ()

QTextEncoder * makeEncoder (
  • ConversionFlagsflags)

int mibEnum ()

QByteArray name ()

QString toUnicode (

QString toUnicode (
  • const char *chars)

QString toUnicode (

Static Public Functions

QList< QByteArray > availableCodecs ()

QList< int > availableMibs ()

QTextCodec * codecForCStrings ()

QTextCodec * codecForHtml (

QTextCodec * codecForHtml (

QTextCodec * codecForLocale ()

QTextCodec * codecForMib (
  • intmib)

QTextCodec * codecForName (

QTextCodec * codecForName (
  • const char *name)

QTextCodec * codecForTr ()

QTextCodec * codecForUtfText (

QTextCodec * codecForUtfText (

void setCodecForCStrings (

void setCodecForLocale (

void setCodecForTr (

Protected Functions

QTextCodec ()

virtual~QTextCodec ()


QByteArray convertFromUnicode (

QString convertToUnicode (

Last modified: 2015-07-24

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus