pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/0d4e01ca0747dd3d6484403acb7a1728b0c8652e

60c69660fa.css" /> Issue #13916: Fix surrogatepass error handler on Windows · python/cpython@0d4e01c · GitHub
Skip to content

Commit 0d4e01c

Browse files
committed
Issue #13916: Fix surrogatepass error handler on Windows
1 parent b96ebd4 commit 0d4e01c

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Lib/test/test_codecs.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,12 +2841,6 @@ def test_cp1252(self):
28412841
(b'abc', 'strict', 'abc'),
28422842
(b'\xe9\x80', 'strict', '\xe9\u20ac'),
28432843
(b'\xff', 'strict', '\xff'),
2844-
# invalid bytes
2845-
(b'[\x98]', 'strict', None),
2846-
(b'[\x98]', 'ignore', '[]'),
2847-
(b'[\x98]', 'replace', '[\ufffd]'),
2848-
(b'[\x98]', 'surrogateescape', '[\udc98]'),
2849-
(b'[\x98]', 'surrogatepass', None),
28502844
))
28512845

28522846
def test_cp_utf7(self):

Python/codecs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,10 @@ get_standard_encoding(const char *encoding, int *bytelength)
960960
}
961961
}
962962
}
963+
else if (strcmp(encoding, "CP_UTF8") == 0) {
964+
*bytelength = 3;
965+
return ENC_UTF8;
966+
}
963967
return ENC_UNKNOWN;
964968
}
965969

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy