[Qt-interest] How to compress QString
Jan Kundrát
jkt at gentoo.org
Thu Apr 16 13:35:25 CEST 2009
Ankit Agarwal wrote:
> Whats the advantage that we get by converting the string to UTF - 8?
No need to figure out magic multiplication constants for figuring out
the string size. Basically, if you convert a QString to a QByteArray
holding its UTF-8 representation, you can tell the size of the data from
QByteArray's size(). Also having a stable and well-documented
intermediate format (which a byte array of UTF-8 data is) always helps.
Cheers
-jkt
--
cd /local/pub && more beer > /dev/mouth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090416/ffc6b4d6/attachment.bin
More information about the Qt-interest-old
mailing list