|  | Home · All Namespaces · All Classes · Main Classes · Grouped Classes · Modules · 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 * str, int size )
- QTextCodec * codecForIndex ( int i )
- QTextCodec * codecForName ( const char * hint, int accuracy )
- const char * locale ()

## Member Function Documentation

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

This functionality is no longer provided by Qt. This compatibility function always returns a null pointer.

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

Use availableCodecs() or availableMibs() instead and iterate through the resulting list.

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

Use the codecForName(const QByteArray &) overload instead.

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

This is an overloaded member function, provided for convenience.

### 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

Use name() instead.

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

This is an overloaded member function, provided for convenience.

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