[Mailman-Developers] translation of mail templates
Stephen J. Turnbull
stephen at xemacs.org
Mon Aug 27 03:49:31 CEST 2012
Mark Sapiro writes:
> If mailman generates web pages with non-ascii, say utf-8 encoded
> characters and the installation's web server assigns a default character
> set other than utf-8, all the utf-8 encoded characters will be garbled.
> This will not happen if the characters are encoded as HTML
> entities.
So have Mailman do the encoding. Mandate that the input data such as
templates are UTF-8, that template writers are responsible for
ensuring that entities (eg, &) are syntactically correct (they
will not be HTML-escaped), the output HTML pages are ASCII, and have
Mailman do the translation of non-ASCII to HTML entities. Patrick
gets what he wants, Mailman's generated pages are robust to webservers
with broken encoding configs, and it is simple to check whether a user
has done something stupid like encode their templates in Windows-1252.
Note that this can be done algorithmically by using the horribly ugly
Unicode "entities", and the extension to prettier named entities is
easy.
You could even provide a config option to turn off HTML escaping
(defaulting to escaping on). If somebody has the skills to look at
HTML source in a browser and cares, they probably have the skills to
configure a webserver properly.
Steve
More information about the Mailman-Developers
mailing list