eugeneia / cl-rfc2047

Implementation of RFC 2047.
MIT License
2 stars 1 forks source link

Incorrect handling of spaces between encoded words #1

Closed jathd closed 9 years ago

jathd commented 9 years ago

RFC 2047 specifies (p. 11):

Any amount of linear-space-white between 'encoded-word's, even if it includes a CRLF followed by one or more SPACEs, is ignored for the purposes of display.

The spaces are currently preserved:

> (cl-rfc2047:decode* "=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=")
"a b"

(The expected result is "ab".)

A more complete test case might be

(cl-rfc2047:decode* 
 (format nil "=?ISO-8859-1?Q?a?=  ~A  ~:*~A  =?ISO-8859-1?Q?b?=" 
         cl-rfc2047::*crlfsp*))

with expected result "ab".

eugeneia commented 9 years ago

Thank you for reporting this issue. Will take a look as soon as possible.

eugeneia commented 9 years ago

@jathd I just pushed a fix and the proposed test case. Please close this issue if you are satisfied.