Details
-
Bug
-
Resolution: Cannot Reproduce
-
P0: Blocker
-
None
-
6.0.0 Alpha
-
None
Description
In the initial Qt 6.0 Alpha release, the QStringConverter::encodingForData function was inserting a zero character somewhere at the start of the string:
#include <QByteArray> #include <QDebug> #include <QStringConverter> int main() { const QByteArray bytes { "Foo bar baz" }; qDebug() << "before:" << bytes; QStringConverter::encodingForData(bytes.constData(), bytes.size()); qDebug() << "after :" << bytes; }
output:
before: "Foo bar baz" after : "Foo \x00""ar baz"
See comment for updated version for the latest Qt 6.0 Alpha release, where the parameter changed to QByteArrayView, which now crashes on this example.