|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# Qt 3 Support Members for QTextCodec

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

- QTextCodec class reference

### Public Functions

- QByteArray fromUnicode ( const QString & uc, int & lenInOut ) const
- QByteArray mimeName () const
- QString toUnicode ( const QByteArray & a, int len ) const

### Static Public Members

- QTextCodec * codecForContent ( const char *, int )
- QTextCodec * codecForIndex ( int i )
- QTextCodec * codecForName ( const char * hint, int )
- const char * locale ()

## Member Function Documentation

### QTextCodec * QTextCodec::codecForContent ( const char *, int ) `[static]`

### QTextCodec * QTextCodec::codecForIndex ( int i ) `[static]`

### QTextCodec * QTextCodec::codecForName ( const char * hint, int ) `[static]`

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

### QByteArray QTextCodec::fromUnicode ( const QString & uc, int & lenInOut ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

### const char * QTextCodec::locale () `[static]`

Returns a string representing the current language and sublanguage, e.g. "pt" for Portuguese, or "pt_br" for Portuguese/Brazil.

See also QLocale.

### QByteArray QTextCodec::mimeName () const

### QString QTextCodec::toUnicode ( const QByteArray & a, int len ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

a contains the source characters; len contains the number of characters in a to use.