Hi,
In the process of porting Tellico to KF5, one of my unit tests that
depends on KCodecs::base64Encode() started to fail. After poking at it a
little bit, my impression is that KF5::KCodecs is including a newline at
the end of the byte string, where the kdelibs4 version didn't.
But it's late, and I'm not seeing completely straight either, so I
wanted to ask the mailing list. I must be doing something wrong...
Using the simple test-case in the class documentation:
QByteArray input = "Aladdin:open sesame";
QByteArray result = KCodecs::base64Encode(input);
qDebug() << "Result: " << result;
With kdelibs4, I get this:
Result: "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
which I expect.
But with KF5::KCodecs, I get this:
Result: "QWxhZGRpbjpvcGVuIHNlc2FtZQ==
"
which obviously includes a newline.
Am I missing something? Looking at the KCodecs code, the insertLFs
variable is completely ignored, though it wouldn't matter in my test
case anyway since the string is less than 76 characters. And it's not a
qDebug problem, I don't think.
Any help? I'm feeling rather silly...
Thanks!
Robby
Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<