On Sun, 15 May 2022 at 07:24, Turtle Creek Software
<supp...@turtlesoft.com> wrote:
>
> We just started moving a Mac project to Windows.
>
> When reading text resources into a QString, the Win version automatically 
> replaces all /n line endings with /r/n.  That screws up our line parsing.

Shouldn't it be the other way round...? A text file Reader converts
"\r\n" to "\n" on Windows.

It's a text file Writer that converts "\n" in a QString to "\r\n" in a
file on Windows.


> The code creates a QString from QFile:readAll(), and the change happens 
> somewhere in that constructor.
>
> Is there a way to prevent that behavior?  Using QFile::readLine() would be a 
> pain.
>
> Thanks, Casey McD

What behaviour do you want, and how does it make it less painful?


Regards,
Sze-Howe
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to