priceey
23rd February 2009, 15:44
Hello again
I am writing an application that is converting some code from char to ascii to hex as so..
QString string = (compressed_string2.c_str());
QString res = string.toAscii().toHex();
qDebug() << res;
Now my problem is that sometimes I get NULL characters in the code, and therefore I do not parse the rest of the text. for example, my output should be
9c00f57b74
instead I get
9c
I am pretty bad with QT. From my investigation so far, the best I can deduce is to use codecForCStrings but for the life of me I can't work it out.
Anyone have any ideas how I can convert the ascii control characters?
thanks
Priceey
I am writing an application that is converting some code from char to ascii to hex as so..
QString string = (compressed_string2.c_str());
QString res = string.toAscii().toHex();
qDebug() << res;
Now my problem is that sometimes I get NULL characters in the code, and therefore I do not parse the rest of the text. for example, my output should be
9c00f57b74
instead I get
9c
I am pretty bad with QT. From my investigation so far, the best I can deduce is to use codecForCStrings but for the life of me I can't work it out.
Anyone have any ideas how I can convert the ascii control characters?
thanks
Priceey