strange result with json-server & zope

Gabriel Genellina gagsl-py at
Sat Sep 16 13:10:18 CEST 2006

At Saturday 16/9/2006 07:28, astarocean wrote:

>[the script]
>body_html = container.mime_mail(body_html=body_html)
>container.MailHost.send(messageText=body_html, mto=to_email,
>mfrom=from_email, subject=subject, encode=None)
>[mime_mail is a dtml-method]
><dtml-mime type="text/html" charset="utf8" encode="quoted-printable"
><dtml-var body_html missing="this is the body of mail goes">

"utf8" is not the right spelling, should be UTF-8

>[called from json-rpc]
>Content-Type: text/html;
>     charset="utf8"
>Content-Disposition: inline
>Content-Transfer-Encoding: quoted-printable
>< ! D O C T Y P E   H T M L   P U B L I C   " - / / W 3 C / / D T D   H
>T M=
>  L   4 . 0 1   T r a n s i t i o n a l / / E N "
>  " h t t p : / / w w w . w 3 . o r g / T R / h t m l 4 / l o o s e . d
>t d =
>" >

But this is not UTF-8; looks like UTF-16 with 0x00 converted to 0x20 
(space). I'd look at where the body comes from, or ask on the Zope 
list for the right way to use dtml-mime.

Anyway, why are you using dtml-mime and such? Using the email package 
is easier and a lot more powerful.

Gabriel Genellina
Softlab SRL 

Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!

More information about the Python-list mailing list