View Full Version : reading from QTextStream

14th December 2006, 07:18

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?

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