PDA

View Full Version : reading from QTextStream



matyi52
14th December 2006, 08:18
Hi!

I trying to use xml communication. This is the first tag I should read: "<connection>"
Why is that, if I read from QTextStream (constructed with QTextStream ( QIODevice * ) ),
I get this: "<onnection>"? The "c" is missing!
If I read from the socket using socket->readBlock(buffer, socket->bytesAvailable()), I get the whole string "<connection>" correctly.

Anybody seen this before?

e8johan
14th December 2006, 08:26
It could be some sort of locale eating your characters. QTextStreams use the current locale to encode the data into unicode.