|  | Home · All Classes · Modules

# QTextEncoder Class Reference
[QtCore module]

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

### Methods

- __init__ (self, QTextCodec)
- QByteArray fromUnicode (self, QString)

## Detailed Description

The QTextEncoder class provides a state-based encoder.

A text encoder converts text from Unicode into an encoded text format using a specific codec.

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

See also QTextCodec.makeEncoder() and QTextDecoder.

## Method Documentation

### QTextEncoder.__init__ (self, QTextCodec)

Constructs a text encoder for the given codec.

### QByteArray QTextEncoder.fromUnicode (self, QString)

Converts the Unicode string str into an encoded QByteArray.