gh-129173: simplify PyCodec_XMLCharRefReplaceErrors
logic
#129894
Merged
PyCodec_XMLCharRefReplaceErrors
logic
#129894