Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-39337: encodings.normalize_encoding() now ignores non-ASCII characters #22219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 14, 2020
Prev Previous commit
Next Next commit
apply victor's comment
  • Loading branch information
shihai1991 committed Oct 3, 2020
commit dbb0062bd00f1dc9fd889eac8de1a7e43f5f4fce
4 changes: 2 additions & 2 deletions 4 Lib/test/test_source_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def test_bpo39337(self):
"""
import encodings

out = encodings.normalize_encoding("���-8")
self.assertEqual(out, '8')
out = encodings.normalize_encoding("utf\xE9\u20AC\U0010ffff-8")
shihai1991 marked this conversation as resolved.
Show resolved Hide resolved
self.assertEqual(out, 'utf_8')


if __name__ == "__main__":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
similar to :c:func:`_Py_normalize_encoding`,
:func:`encodings.normalize_encoding` should ignore non-ASCII letters.
:func:`encodings.normalize_encoding` now ignores non-ASCII letters.
shihai1991 marked this conversation as resolved.
Show resolved Hide resolved
Morty Proxy This is a proxified and sanitized view of the page, visit original site.