[EMAIL PROTECTED] writes:

> To clarify, I didn't mean writing an editor -- what I meant was
> something like:
>
>   1) User creates template using favorite editor
>
>   2) User runs it through program to guess and perform encoding for
>      headers
>
> Does that seem like it's a lot of work?

How would #2 work?  It's not possible given a sequence of bytes to
guess what charset it should be encoded with.  We discussed this point
on mimelib-devel today actually.  Quoting Ben Gertzfield:

  ``It's sometimes possible for Asian charsets, but not for Latin ones
  without some deep statistical analysis.  All the ISO-8859-* charsets
  use the byte values above 128 for distinct characters, but there's
  no pattern of their use.''

> Just a thought -- it seems to me that if you are going to provide a
> way to be explicit about header encodings, you could also let the user
> specify what encoding their template is stored in.

I'm already doing this.

To clarify, the Header.CHARSET syntax allows the user to specify the
input charset.  How to properly encode that in headers and body is
determined automatically by the Python email package when the message
is sent.

For example, Subject.EUC-JP means you store the Subject header value
in EUC-JP.  When the message is sent, it's actually converted to
ISO-2022-JP.

> FWIW, I'm perfectly happy w/ templates in EUC-JP.

That's good, because you don't have any other choice <wink> because of
the template string substitution issue.  I believe it was you who
reported problems with templates in ISO-2022-JP.
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to