Commit 16f4dee
authored
ElementTree.parse() with a text file mis-decoded the text in the C
implementation: _parse_whole() encoded it as UTF-8, but left expat to honor
the encoding declared in the document. It now overrides the encoding, as
XMLParser.feed() already does for str data.
(cherry picked from commit c83013c)
1 parent a371ba8 commit 16f4dee
3 files changed
Lines changed: 40 additions & 0 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Library
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1028 | 1056 | | |
1029 | 1057 | | |
1030 | 1058 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4037 | 4037 | | |
4038 | 4038 | | |
4039 | 4039 | | |
| 4040 | + | |
4040 | 4041 | | |
4041 | 4042 | | |
4042 | 4043 | | |
| |||
4053 | 4054 | | |
4054 | 4055 | | |
4055 | 4056 | | |
| 4057 | + | |
| 4058 | + | |
| 4059 | + | |
| 4060 | + | |
| 4061 | + | |
4056 | 4062 | | |
4057 | 4063 | | |
4058 | 4064 | | |
| |||
4076 | 4082 | | |
4077 | 4083 | | |
4078 | 4084 | | |
| 4085 | + | |
4079 | 4086 | | |
4080 | 4087 | | |
4081 | 4088 | | |
| |||
0 commit comments