QTextCodec - continued

David Cortesi davecortesi at gmail.com
Fri Aug 26 20:39:47 BST 2022


It appears the uses of QTextCodec have been taken over by the classes
QStringConverter, -Encoder, and -Decoder. This change isn't mentioned in
the docs for either class. The principal difference between the old class
and the new, appears to be that QStringConverter etc. maintain state
between successive calls, so they can handle a multi-byte character that
might be split over two "chunks" of text.

Whereas I was calling QTextStream.setCodec() it appears that method no
longer exists, replaced by QTextStream.setEncoding().

Thanks for the pointers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220826/08c9ad16/attachment.htm>


More information about the PyQt mailing list