Click to See Complete Forum and Search --> : NNTP yenc files


arsenic0
December 19th, 2009, 06:34 PM
So, i am having quite a bit of problems and im not sure exactly what im doing wrong.

Long story short, i have a file(an .nfo) off of a newsgroup, encoded it with yEnc32.

I then download the article that has the .nfo from the NNTP server.

Seems easy enough, except the file i get off of the server is corrupt and wont decode into the same original .nfo file.

Looking at them in notepad++ they look identical with the exception that mine has some part= stuff added which shouldnt matter. Whats wrong is when you do a compare of the two in hex(image below) there is a lot of differences...

I am lost on whats going on, the library i am using is doing nothing but reading in the response and appending it to a string. Do i need to do some special decoding? Trying to convert it to Ascii just makes all the special characters into ?'s...

Ive been stuck on this for a few days so any help would be greatly appreciated.

The left side is my file, the right side is their file. my file is nearly 300 bytes bigger than the other.
For example, if you look at the two files in notepad as i said they look identical
If you look at the first difference in the data part , at the JJJJk section you can see that it should be JJJk~, but for some reason mines JJJk<insert a bunch of wierd ascii **** here>~...what is that crap and why isnt it showing up in my textpad but it is in hex view...

http://www.fuzzelogicsoftware.com/images/untitled.JPG

arsenic0
December 19th, 2009, 08:54 PM
Another interesting tidbit...

If after i get the article i copy and paste the entire string from VS2008 while its debugging and copy it into notepad and remove all the /n's and replace them with linebreaks the file works fine and decodes properly. Below is the code im using which is nothing fancy, a.body.text is just a string that contains the data, ive tried using ASCII encoding on the streamwriter, no luck. All the special characters come out as ?'s

StreamWriter tw = new StreamWriter("H:\\file.txt");
tw.Write(a.Body.Text);
tw.Close();