Dabei fiel mir folgende Stelle ins Auge:
Nun frage ich mich doch einfach naiv: Wieso eigentlich kann / darf WSGI keine Konfiguration haben? Wo liegt da das Problem? Bei einem SQLAlchemy muss ich das Encoding der Datenbank ja auch explizit angeben. Inwiefern wäre das problematisch, ein solches "Durchreichen" auch für Libs zu definieren, die einen WSGI Layer implementieren? Vielleicht ist die Erklärung ja trivial, aber im Moment erschließt sie sich mir nicht.Here a list of web related libraries operating on unicode (just a small pick): Django, Pylons, TurboGears 2, WebOb, Werkzeug, Jinja, SQLAlchemy, Genshi, simplejson, feedparser and the list goes on.
What these libraries can have, what a protocol like WSGI does not, is having the knowledge of the encoding used. Why? Because in practice (not on the paper) encodings on the web are very simple and driven by the application: the encoding the application sends out is the encoding that comes back. It's as simple as that. However WSGI does not have that knowledge because how would you tell WSGI what encoding to assume? There is no configuration for WSGI so the only thing we could do is forcing a specific charset for WSGI applications on Python 3 if we want to get unicode onto that layer. Like utf-8 for everything except headers which should be latin1 for RFC compliance.
Da auf diesem Gebiet ja keine Idioten tätig sind, muss es ja einen guten Grund geben, wieso so eine einfache Idee nicht umsetzbar ist!
(Dies wurd auch schon in der Diskussion angesprochen, wie ich grad gelesen habe)
Vielleicht kann mir das einer der Kenner hier versuchen zu erklären
