From 54d005a0f1ff7ba5eb29d975e4f6735d24a4c972 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 15 Sep 2018 16:01:03 +0530 Subject: quoted-printable: Q-encode #\? and #\_ with their ASCII values. * email/quoted-printable.scm (%q-encoding-literal-char-set, %quoted-printable-literal-char-set): New variables. (quoted-printable-encode): Move core encoding code to ... (quoted-printable-style-encode): ... this new function. (q-encoding-decode): Call quoted-printable-style-encode with the appropriate literal-char-set instead of calling quoted-printable-encode. * tests/quoted-printable.scm (q-encoding of special characters): Add to check for this bug. --- tests/quoted-printable.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/quoted-printable.scm') diff --git a/tests/quoted-printable.scm b/tests/quoted-printable.scm index 334380d..554b85d 100755 --- a/tests/quoted-printable.scm +++ b/tests/quoted-printable.scm @@ -106,4 +106,10 @@ abriquent pour te la vendre une =C3=A2me vulgaire.") charset) decoded-text)) +(test-equal "q-encoding of special characters" + (q-encoding-encode (string->bytevector " _?" "UTF-8")) + (string-append "_" + (quoted-printable-escape-encode-char #\_) + (quoted-printable-escape-encode-char #\?))) + (test-end "quoted-printable") -- cgit v1.2.3