-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
QDS 4.7.1, QDS 4.7.2
-
None
- Qt.btoa () return Base64 code for Uint8Array in qml project when running qml by external tool qml.exe
var bytes2 = new Uint8Array([0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x01, 0x00, 0x01, 0x00, 0xF0, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x02, 0x44, 0x01, 0x00, 0x3B]) var binaryString = '' for (var i = 0; i < bytes2.byteLength; i++) { binaryString += String.fromCharCode(bytes2[i]) } console.log(Qt.btoa(binaryString))
Debug: R0lGODdhAQABAMOwAADDvwAAAAAALAAAAAABAAEAAAICRAEAOw==
it is error
run the code on other software and web like " https://www.wetools.com/js-run"
https://base64.guru/developers/javascript/examples/encode-remote-file
just change Qt.batoa to "btoa" console.log(btoa(binaryString))
R0lGODdhAQABAPAAAP8AAAAAACwAAAAAAQABAAACAkQBADs=
- Mr. Ulf Hermann have fixed this bug in qt QML: Declarative and Javascript Engine , PLS refer
QTBUG-135329, but the fix is only for QT.611 , so any new QDS will still has this bug untill QDS(qml.exe) build by QT6.11 - Could QDS team include the fix code to build QDS4.8?