[Doc-SIG] Non-ASCII Characters in reST (was: [Doc-SIG] docutils f eedback )

Aahz aahz@pythoncraft.com
Mon, 17 Jun 2002 22:36:14 -0400


On Mon, Jun 17, 2002, David Goodger wrote:
>
> I've got an "--encoding" option in docutils/frontend.py, but it's
> commented out as unimplemented.  I've heard that such a command-line
> option is a **bad thing**, as are inline magic comments or directives.
> There's a comment, "Take default encoding & language from locale?".  I
> don't know how best to proceed.  I'd like to make the *right* decision
> here, not just "good enough for now".  That's one of the reasons I
> haven't implemented the encoding issue yet.  I've seen this debated,
> on Python-Dev and elsewhere, but I have yet to be shown "the one true
> way" or convinced that it *is* the right way.

See PEP 263.  That way, at worst you're compatible with Python.

> Another reason is because there are really two encodings at play here:
> the input encoding and the output encoding.  Is it reasonable to
> require that both be specified (with UTF-8 as defaults)?  Western
> Europeans will want to use Latin-1 as the default, but that's not
> friendly to the rest of the world.  Is locale the answer?  Or are
> explicit command-line options the best way?  A combination?

I'd suggest a directive as the answer to output encoding; someone who
wants to implement dynamic output encoding can do so with an extension
directive of some kind.  Just make the API clear.
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/