summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--email/email.scm2
-rw-r--r--tests/email.scm6
2 files changed, 7 insertions, 1 deletions
diff --git a/email/email.scm b/email/email.scm
index ef2efe9..a791a0e 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -564,7 +564,7 @@
((q) q-encoding-decode)
(else (error "Encoding of MIME word unknown" word)))
encoded-text)
- charset)))
+ charset 'substitute)))
'post))
(define (body->mime-entities body boundary)
diff --git a/tests/email.scm b/tests/email.scm
index 1346b20..ca0ebc3 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -351,4 +351,10 @@ body" "iso-8859-1"))
(content-transfer-encoding . 7bit)
(subject . "Foo Bãr")))
+(test-equal "tolerate decoding errors in MIME encoded words"
+ ((module-ref (resolve-module '(email email))
+ 'decode-mime-encoded-word)
+ "=?UTF-8?Q?B=E8r?=")
+ "B�r")
+
(test-end "email")