I am having a problem with the URL class. Whenever I request a URL using readEntireTextStream(bool) I always get a couple of garbage lines, at the start of the stream and at the end. The beginning garbage line seems to be always composed of three characters, and the end is usually “0”. This means that if I request an XML file via URL, it ALWAYS fails to parse.
In addition, I get the occasional 3 character garbage line in some webpages, between the beginning and the end.
Is this normal? Can anyone reproduce this?
Also, to reiterate a previous problem I was having, URL doesn’t seem to encode non-ascii characters properly. Things like curly quotes and em-dashes produce the wrong output.
Again, I am using OS X, 10.5.