View Single Post
Old 05-20-2014, 11:22 PM   #86
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by tshering View Post
Edit: DNSB has of course the correct address. The encoding however has changed. Each char is now two bytes. For our purpose, every second byte has to have a value of 0; e.g. h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00a\x00p\x00i\x00 instead of https://api. I am in a hurry and cannot write the code myself now.
These are C++ QString objects, they have length, character width, and some other fields preceding the string of 16-bit characters. if you modify them you need to either keep the length of the string unchanged, or else update the length field. and add a 16-bit null terminator \x00\x00.

Last edited by GeoffR; 05-21-2014 at 03:37 PM. Reason: null terminator not needed for QString
GeoffR is offline   Reply With Quote