Commit 6304ae8
gh-93251: Decode localized socket error messages from the locale encoding
The gai_strerror() and hstrerror() messages were decoded as UTF-8, so
gaierror and herror could be replaced with UnicodeDecodeError if the
message is localized and the locale encoding is not UTF-8.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 5062427 commit 6304ae8
3 files changed
Lines changed: 33 additions & 2 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Library
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1787 | 1787 | | |
1788 | 1788 | | |
1789 | 1789 | | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
1790 | 1807 | | |
1791 | 1808 | | |
1792 | 1809 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
748 | 758 | | |
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
752 | 762 | | |
753 | 763 | | |
754 | 764 | | |
755 | | - | |
| 765 | + | |
756 | 766 | | |
757 | 767 | | |
758 | 768 | | |
| |||
779 | 789 | | |
780 | 790 | | |
781 | 791 | | |
782 | | - | |
| 792 | + | |
783 | 793 | | |
784 | 794 | | |
785 | 795 | | |
| |||
0 commit comments