[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About Uncook- "a great lil' Utility too!!"
Glue Sniffin' Ed writes ...
>
....
> > The usual Text mode download corruption seems to be insertion of a
> > Return ($0D) before any Line-feed ($0A) which does not already have a
> > preceding $0D.
....
> > how does it know the difference between bad $0D $0A pairs and $0D $0A
> > pairs which belong in the file?
....
> > It looks like Uncook (somehow) works-- at least most of the time.
> > (Thanks for a neat util discovery, GS Ed!)
....
>
> Anytime :-) Again.....I know not how it works.....I just know that it
> does most of the time.......for me anyways :-)
My guess is that Windows or Netscape must maintain some kind of temporary
'junk file' copy of downloads. When a file is downloaded in Text mode, the
unmodified copy goes into this temp file and into a buffer. Once the download
is finished, the line enders are 'fixed' in the buffer and the file appears in
your directory. The unmodified copy remains in the junk file (maybe for weeks)
until its portion of the cache is eventually over-written.
When Uncook does its magic, it looks for the original copy in the junk
file and uses it to produce the "uncooked" file free of messed-around line
ender characters.
This would explain why Uncook sometimes does not work. Aside from a few
downloads which are screwed up to begin with, it would not work if applied to
an old download for which the original has been over-written.
Whatever, it's a 'good trick'!
Rubywand