[Python-de] mod_python und Umlaute

Hans Bolte _unterstrichenen_teil_entfernen_hansbolte at t-online.de
Fr Nov 11 07:54:11 CET 2011


On 11.11.2011 07:35, Hans Bolte wrote:

> Also so funktioniert es:
> ------------------------------
> # -*- coding: latin1 -*-
>
> def index(req):
> s = """\
> <html><head>
> Content-type: text/html\n\n
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n
> </head><body>
> ü
> </body></html>
> """
> return s
> ------------------------------

Nein, sondern so:
------------------------------
# -*- coding: utf-8 -*-

def index(req):
    s = """\
<html><head>
   <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
</head><body>
ü
</body></html>
"""
    return s
------------------------------

-- 
Hans
<http://www.hansbolte.net>



Mehr Informationen über die Mailingliste python-de