Hi
Nihil has implied a good suggestion: analyse your problem - e.g. do you have the same problem with all kind of "downloads"?
You won't.
The problem is caused by the fact that a doc-file is binary, not ascii, hence
treating the "download" as a textstream will fail (StreamReader implements a TextReader). StreamReader will auto-detect the encoding (Ascii, UTF-7/8/16) ,
ie. you don't have to specify it.
Use the BinaryReader-Implementation of Stream[1]. I had a quick look at the web and have found a nice sample chapter[2] and this implementation of a web-crawler[3] (in C#, but it's all the same).
Cheers
[1] http://msdn2.microsoft.com/en-us/lib...er(VS.80).aspx
[2] http://www.microsoft.com/mspress/boo...chap/6436.aspx
[3] http://www.codeproject.com/cs/internet/Crawler.asp





Reply With Quote