Table Of Contents

Previous topic

QFileInfo

Next topic

QTextEncoder

QTextDecoder

Synopsis

Functions

Detailed Description

The PySide.QtCore.QTextDecoder class provides a state-based decoder.

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

The decoder converts text in this format into Unicode, remembering any state that is required between calls.

class PySide.QtCore.QTextDecoder(codec)
class PySide.QtCore.QTextDecoder(codec, flags)
Parameters:

Constructs a text decoder for the given codec .

PySide.QtCore.QTextDecoder.hasFailure()
Return type:PySide.QtCore.bool

Determines whether the decoder encountered a failure while decoding the input. If an error was encountered, the produced result is undefined, and gets converted as according to the conversion flags.

PySide.QtCore.QTextDecoder.toUnicode(ba)
Parameters:baPySide.QtCore.QByteArray
Return type:unicode

This is an overloaded function.

Converts the bytes in the byte array specified by ba to Unicode and returns the result.