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

# QTextEncoder Class Reference

The QTextEncoder class provides a state-based encoder. More...

    #include <QTextEncoder>

Note: All the functions in this class are reentrant.

- List of all members, including inherited members

### Public Functions

- virtual ~QTextEncoder ()
- virtual QByteArray fromUnicode ( const QString & uc, int & lenInOut ) = 0

## Detailed Description

The QTextEncoder class provides a state-based encoder.

The encoder converts Unicode into another format, remembering any state that is required between calls.

See also QTextCodec::makeEncoder().

## Member Function Documentation

### QTextEncoder::~QTextEncoder () `[virtual]`

Destroys the encoder.

### QByteArray QTextEncoder::fromUnicode ( const QString & uc, int & lenInOut ) `[pure virtual]`

Converts lenInOut characters (not bytes) from uc, producing a QByteArray. lenInOut will be set to the length of the result (in bytes).

The encoder is free to record state to use when subsequent calls are made to this function (for example, it might change modes with escape sequences if needed during the encoding of one string, then assume that mode applies when a subsequent call begins).