[Interest] QTextStream problem
Thiago Macieira
thiago.macieira at intel.com
Wed Jul 31 16:40:52 CEST 2024
On Wednesday 31 July 2024 05:16:49 GMT-7 Turtle Creek Software wrote:
> The data files may have any of 3 possible line endings, depending on
> whether they were made on Windows or old/new Macs. The one we tested with
> must have been created on an older Mac with just CR.
Those are not supported and I don't think they've ever been. That's not
considered text by Qt.
> Seems to me that QTextStream::readAll should read all the text, like the
> name says. Let the user process line endings. Ditto for
> QTextStream::read. Actually readLine also breaks, because CRs are stripped
> before it parses lines.
Feel free to turn off line-ending automatic fixing. QTextStream honours the
QIODevice::isTextModeEnabled() and QIODevice::Text flag.
> If existing users rely on CR-zapping, then at least add a mention in the
> docs and/or a way to control it.
Right, the documentation doesn't explain what line endings are supported.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Platform & System Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20240731/40e4953e/attachment.bin>
More information about the Interest
mailing list