diff options
author | Tim Graham <timograham@gmail.com> | 2017-02-07 12:05:47 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2017-02-09 09:03:47 -0500 |
commit | 500532c95db40b0b24654be7bb0d76b66b022bd5 (patch) | |
tree | 761766d7138652703e566ac9c96960a265f036ff /django/utils/encoding.py | |
parent | 21f13ff5b3d5a42d62f38398c010efcdce30dad7 (diff) | |
download | django-500532c95db40b0b24654be7bb0d76b66b022bd5.tar.gz |
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
Diffstat (limited to 'django/utils/encoding.py')
-rw-r--r-- | django/utils/encoding.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py index a050586cba..63f4193701 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -165,7 +165,7 @@ def uri_to_iri(uri): return uri uri = force_bytes(uri) iri = unquote_to_bytes(uri) - return repercent_broken_unicode(iri).decode('utf-8') + return repercent_broken_unicode(iri).decode() def escape_uri_path(path): @@ -192,7 +192,7 @@ def repercent_broken_unicode(path): strictly legal UTF-8 octet sequence. """ try: - path.decode('utf-8') + path.decode() except UnicodeDecodeError as e: repercent = quote(path[e.start:e.end], safe=b"/#%[]=:;$&()+,!?*@'~") path = repercent_broken_unicode( |