[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    QTextCodec - continued
From:       David Cortesi <davecortesi () gmail ! com>
Date:       2022-08-26 19:39:47
Message-ID: CALyzANvS_zA1AZoYXysN8MxoXOa0GKE18_O5K8npw4iHhZzxBg () mail ! gmail ! com
[Download RAW message or body]

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.

[Attachment #3 (text/html)]

<div dir="ltr"><div>It appears the uses of QTextCodec have been taken over by the \
classes QStringConverter, -Encoder, and -Decoder. This change isn&#39;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 \
&quot;chunks&quot; of text.</div><div><br></div><div>Whereas I was calling \
QTextStream.setCodec() it appears that method no longer exists, replaced by \
QTextStream.setEncoding().</div><div><br></div><div>Thanks for the \
pointers.</div><div><br></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic