[PATCH 0 of 5] Make mail understand more than just ascii (#841)

Christian Ebert blacktrash at gmx.net
Tue Feb 19 13:16:51 CST 2008


This patch series is for all those godless Mercurii who use more
than the ascii alphabet ;)

It also addresses issue #841.

It's still sketchy and lacks documentation, but it would be nice
to have some feedback first, especially, whether the approach in
general is ok, how to handle patches containing 8-bit text and of
couse patches containing more than one charset.

The cleanest solution would probably be to send them as binary
attachments (application/x-patch ?).

- be polite and able to spell recipients, senders correctly
  (as long as the user is ;) see Cc for silly example)
- be ultra conservative with patches
- be flexible with remaining mail interaction
  - introductory messages
  - patch descriptions, when patch as attachment
  - notify

- introduce new [email] config, default (for western Europeans):
sendcharsets = iso-8859-1, iso-8859-15, windows-1252
# other examples:
# iso-8859-1, iso-8859-15, windows-1252, iso-8859-2, windows-1250
# iso-8859-1, iso-8859-15, windows-1252, iso-8859-2, windows-1250, iso-2022-jp, iso-2022-jp-ms

(idea stolen from Mutt)

us-ascii, utf-8 do not have to be included, are always checked.

At the moment this relies on $HGENCODING being compatible with
locale. If desired I can copy the code from util w/o the
environment check to get current locale.

Proposed as "hidden" extension to be used by other extensions so
the core is not clobbered.

I am fascinated by Mercurial not only as a code version control
tool, but as a new means of giving texts in general a history,
and, well, texts might contain more than ascii chars.


P.S. and now for a small test:
Der tragische /Transport/ ist nämlich eigentlich leer,
und der ungebundenste.
--Friedrich Hölderlin, Anmerkungen zum Oedipus

More information about the Mercurial-devel mailing list