wsgidav.util.re_encode_wsgi

wsgidav.util.re_encode_wsgi(s: str, *, encoding='utf-8', fallback=False) str[source]

Convert a WSGI string to str, assuming the client used UTF-8.

WSGI always assumes iso-8859-1. Modern clients send UTF-8, so we have to re-encode

https://www.python.org/dev/peps/pep-3333/#unicode-issues https://bugs.python.org/issue16679#msg177450