Implement quoted-printable conversion.
This commit is contained in:
parent
418468f46e
commit
65e0e3154e
2 changed files with 42 additions and 2 deletions
|
|
@ -35,6 +35,7 @@
|
|||
(import scheme
|
||||
(chicken base)
|
||||
(chicken keyword)
|
||||
(chicken string)
|
||||
util-io
|
||||
util-string)
|
||||
|
||||
|
|
@ -43,8 +44,14 @@
|
|||
|
||||
;; Encodes given UTF-8 string as quoted-printable
|
||||
(define (string->qp str)
|
||||
(let ((lst (string->list/utf8 str)))
|
||||
str))
|
||||
(let loop ((lst (string->list/utf8 str))
|
||||
(res '()))
|
||||
(if (null? lst)
|
||||
(string-intersperse (reverse res) "")
|
||||
(loop (cdr lst)
|
||||
(cons (let ((chs (car lst)))
|
||||
chs)
|
||||
res)))))
|
||||
|
||||
;; Ensures the subject has proper encoding
|
||||
(define (encode-subject subj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue