Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.15.4, 6.6.0
-
None
-
VS2019 x64
Description
QFile::readLine() handles Linefeeds incorrectly, if the read file has Utf16-LE (Little Endian) format.
In UTF-16-LE, linefeeds are encoded as "0x0a 0x00", but "readLine" seems to cut off the second byte. So the line ends with "0x0a" and the next starts with "0x00", which is incorrect behavior and may lead to consequential errors. (see my example).
Other encodings (UTF-8, UTF-16-BE, Single-Byte) seem to be handled correctly.
Info: the test program was written for Qt6.6.0