Re: [EDIT] Two things about torrents to discuss

In my understanding it is the string length that is “integer encoded in base ten ASCII”. That would mean that the integer is being represented in text form (ASCII) and its textual representation uses base 10 (the digits 0 to 9).

Ah, yes, you’re right. I don’t know what I was thinking of when I was actually reading it.

So it would be better to read the BStrings as QByteArrays (as it is now), but then when we set the QString fields of the Torrent object we should use fromUtf8().

Ok, I’ll do it that way.

Petr

Would you like to post a relpy?


This post is a reply to:
Re: [EDIT] Two things about torrents to discuss
Hi Petr, According to the specification are bencoded strings actually byte strings (encoded in base ten ASCII) so I’d keep it the way it is. Hope I haven’t missed your point (more...)

No follow-ups yet.