encode-uue:update
decode-uue:initialize
decode-uue:finalize
- decode-uue:update)
\ No newline at end of file
+ decode-uue:update)
+\f
+(define (encode-quoted-printable string text?)
+ (call-with-output-string
+ (lambda (output-port)
+ (let ((context (encode-quoted-printable:initialize output-port text?)))
+ (encode-quoted-printable:update context string)
+ (encode-quoted-printable:finalize context)))))
+
+(define-test 'QUOTED-PRINTABLE/UPPERCASE
+ (lambda ()
+ ;; Currently uses digit->char which no longer produces uppercase.
+ (expect-failure
+ (lambda ()
+ (let* ((string "The quïck brøwn fox jump§ over the lazʒ doﻎ.")
+ (utf8 (string->utf8 string))
+ (bytestring (iso8859-1->string utf8)))
+ (assert-equal
+ (encode-quoted-printable bytestring #t)
+ (string-append "The qu=C3=AFck br=C3=B8wn=C2=A0fox jump=C2=A7"
+ " over the laz=CA=92 do=EF=BB=\n=8E.")))))))
+
+(define-test 'QUOTED-PRINTABLE/UNICODE-BUG
+ (lambda ()
+ ;; Can't handle Unicode strings, only legacy byte strings so far.
+ (expect-error
+ (lambda ()
+ (encode-quoted-printable "üñîçøðε" #t)))))
\ No newline at end of file