[Zope3-dev] unicode problems !?

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Oct 8 07:12:44 EDT 2004


On Friday 08 October 2004 03:01, j.kartnaller wrote:
> 1.
> If a doc-string contains non ascii data (eg. german umlaut) I get the
> following error :
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 4:
> ordinal
> not in range(128)

If you have umlauts in the doc string, you must make it a unicode text. 
Example:

def func():
    u"""This is the docstring with an umlaut: ü"""

The doc tool has no way of guessing the encoding you may have used.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list