QTextEncoder¶
The
QTextEncoder
class provides a state-based encoder. More…
Synopsis¶
Functions¶
def
fromUnicode
(str)def
hasFailure
()
Detailed Description¶
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
- class PySide2.QtCore.QTextEncoder(codec)¶
PySide2.QtCore.QTextEncoder(codec, flags)
- param codec:
- param flags:
ConversionFlags
Constructs a text encoder for the given
codec
.Constructs a text encoder for the given
codec
and conversionflags
.
- PySide2.QtCore.QTextEncoder.fromUnicode(str)¶
- Parameters:
str – str
- Return type:
- PySide2.QtCore.QTextEncoder.hasFailure()¶
- Return type:
bool
Determines whether the eecoder 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.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.