From: Dave Burt Date: 2005-03-16T20:39:53+09:00 Subject: Re: [SOLUTION] Quoted Printable (#23) "Florian Gross" wrote: > Matthew Moss wrote: > >> Here is my partial solution for the Quoted Printable quiz. I'm still >> pretty new to Ruby, so it took me a while to get what you see here. I >> think the only thing I didn't get to adding was line length checks. > > And here's mine as well. Sorry for being late -- I coded this up on > Friday and forgot about it until today. > > It ought to handle everything correctly (including proper wrapping of > lines that end in encoded characters) and it does most of the work with > a few simple regular expressions. > Hi Florian, As always, I'm amazed by your concise code. But your solution seems to be failing a bunch of my tests (and not just by chopping lines early, which is allowed): encoding: - escapes mid-line whitespace - escapes '~' - allows too-long lines (my tests saw up to 104 characters on a line) - allows unescaped whitespace on the end of a line (as long as it's preceded by escaped whitespace) decoding: - doesn't ignore trailing literal whitespace Cheers, Dave