[Interest] QTextStream vs UTF-8 string literals
Bernhard Lindner
private at bernhard-lindner.de
Sat Oct 29 19:22:43 CEST 2016
> > http://stackoverflow.com/q/40318671/1421332
> >
> > It asks why operator<<(const char *string) expects latin-1 strings
> > (especially considering that Qt source files shall be UTF-8 now).
> >
> > Is that desired behavior?
>
> No. It's something I didn't notice when I changed the encoding for literals
> in Qt 5.0. See commit cec8cdba4d1b856e17c8743ba8803349d42dc701
>
> http://code.qt.io/cgit/qt/qtbase.git/commit/?
> id=cec8cdba4d1b856e17c8743ba8803349d42dc701
>
> > Is there an easy way to stream a lot of UTF-8 string literals (in an UTF-8
> > source code) without wrapping each literal in a QString()?
>
> No.
Ok, thanks a lot for your answer!
--
Regards, Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161029/fa92badb/attachment.sig>
More information about the Interest
mailing list