From 87c48e9f974313b5748778405f9518a89a6c8999 Mon Sep 17 00:00:00 2001 From: Julius <41548275+jmadotgg@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:21:15 +0100 Subject: [PATCH] UTF-8 encoded data should not by encoded with latin-1 --- src/webob/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webob/request.py b/src/webob/request.py index ee52a7d1..84c3349b 100644 --- a/src/webob/request.py +++ b/src/webob/request.py @@ -114,7 +114,7 @@ def encget(self, key, default=NoDefault, encattr=None): return val encoding = getattr(self, encattr) - if encoding in _LATIN_ENCODINGS: # shortcut + if encoding in _LATIN_ENCODINGS or encoding == 'UTF-8': # shortcut return val return bytes_(val, "latin-1").decode(encoding)