gh-133677: Fix tests when running in non-UTF-8 locale (GH-133865)

6 files changed