ustulation
22nd June 2012, 08:18
hi,
i'm developing a propriety protocol for my company (programming on the server side) and have a very strict deadline. It was decided that we use Qt. It is required to querry the Window Registry and write the value obtained into a prenegotiated socket. I have read the Registry Data into a QString. For certain data I must use 8-bit unicode characters and for some 16-bit unicode characters. I am using QByteArray to store all the data before finally writing to the socket using QTcpSocket::write(). Little Endianness must be followed.
<1> How do i get the data from QString into QByteArray in unicode 8 bit format (specification says character type corresponds to quint8)?
<2> How do i get the data from QString into QByteArray in unicode 16 bit format (specification says character type corresponds to quint16)?
<3> How to maintain Little Endianness on point number 2?
Thank you
i'm developing a propriety protocol for my company (programming on the server side) and have a very strict deadline. It was decided that we use Qt. It is required to querry the Window Registry and write the value obtained into a prenegotiated socket. I have read the Registry Data into a QString. For certain data I must use 8-bit unicode characters and for some 16-bit unicode characters. I am using QByteArray to store all the data before finally writing to the socket using QTcpSocket::write(). Little Endianness must be followed.
<1> How do i get the data from QString into QByteArray in unicode 8 bit format (specification says character type corresponds to quint8)?
<2> How do i get the data from QString into QByteArray in unicode 16 bit format (specification says character type corresponds to quint16)?
<3> How to maintain Little Endianness on point number 2?
Thank you