Revision: 3565 Author: hans URL: http://bknr.net/trac/changeset/3565
Don't use ICONV to convert UTF-8 string to ISO-8859-1 before using cl-qprint to encode the string. This should work fine as long as the string only contains characters from ISO-8859-1.
U trunk/projects/bos/m2/bos.m2.asd U trunk/projects/bos/m2/mail-generator.lisp
Modified: trunk/projects/bos/m2/bos.m2.asd =================================================================== --- trunk/projects/bos/m2/bos.m2.asd 2008-07-22 18:49:39 UTC (rev 3564) +++ trunk/projects/bos/m2/bos.m2.asd 2008-07-22 19:26:59 UTC (rev 3565) @@ -2,7 +2,7 @@
(asdf:defsystem :bos.m2 :depends-on (:bknr.datastore :bknr.modules :cl-smtp :cl-mime - :iconv :kmrcl :iterate :arnesi + :kmrcl :iterate :arnesi :cl-pdf :screamer :cl-fad) :components ((:file "packages") (:file "geo-utm" :depends-on ("packages"))
Modified: trunk/projects/bos/m2/mail-generator.lisp =================================================================== --- trunk/projects/bos/m2/mail-generator.lisp 2008-07-22 18:49:39 UTC (rev 3564) +++ trunk/projects/bos/m2/mail-generator.lisp 2008-07-22 19:26:59 UTC (rev 3565) @@ -81,8 +81,7 @@ (if (listp thing) thing (list thing))) (vcard-field (field-spec &rest values) (let* ((values (mapcar (lambda (value) (or value "")) (ensure-list values))) - (encoded-values (mapcar (lambda (string) (cl-qprint:encode (iconv:iconv "UTF-8" "ISO-8859-1" (or string "")) - :encode-newlines t)) values))) + (encoded-values (mapcar (lambda (string) (cl-qprint:encode (or string "") :encode-newlines t)) values))) (format s "~{~A~^;~}:~{~@[~A~]~^;~}~%" (append (ensure-list field-spec) (unless (equal values encoded-values)