[Doc-SIG] German Umlauts

Christian Tismer tismer at tismer.com
Mon Jul 7 14:24:32 EDT 2003


> On Mon, 7 Jul 2003, Dinu Gherman wrote:
> 
> 
>>Christian Tismer:
>>
>>
>>>Where I have problems are so-called "Umlauts".
>>>I know this is kinda Unicode issue, but I'd just
>>>like to know if and how this is handled in RST?
>>
>>I'm much of a reST newbie myself, but I do see Umlauts using the
>>Latin-1 encoding and a call like this:
>>
>>   rest = docutils.core.publish_string(
>>         text,
>>         writer_name='html',
>>         settings_overrides={'input_encoding': 'latin-1',
>>                             'output_encoding': 'latin-1'})
>>
>>
>>>The simple HTML way of ü doesn't work (why?).
>>
>>Obviously, normal HTML snippets are not just recognised without
>>using some kind of magic directives or escaping mechanisms...
>>Finding that out is on my todo list as well...

Sure, I meant it like a suggestion.

grubert at users.sourceforge.net wrote:

> being ignorant as long as possible, my 2cent:
> 
> 0.01: we have two encodings
> 
>       a. the input encoding: which tells the reader (reST parser)
>          what to expect.
>       b. the output encoding: which tells the writer what to
>          produce.
> 
> 0.02: the html writer does handle the smallest possible number
>       of html character encoding &<>" and as a bonus @ will be
>       written as &#64; to maybe fool some foolish spamrobots.
> 
>       believing from seeing: when i make a document here (latin1 or iso-8859-1)
> 
>       a) running through: html.py without specifying an ecnoding gives me
>          ``Ä`` for an Ä.
>       b) option "-i iso-8859" produces "Ä" for "Ä".
>          and ``<?xml version="1.0" encoding="utf-8" ?>`` in the header.

Thanks a lot, I already found out that it is
possible to specify encoding schemes.
Ok, I should have been more specific:
I'm using ReST in a Zope ZWiki.
How do I change the encoding for Zope?
Is it possible to set that per page,
or do I have to set something by
environment variables, global for Zope?

What would be the most flexible default
encoding for a multilingual website?

thanks again -- chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/




More information about the Doc-SIG mailing list