From d6408b98a425c79d4d5876f08b9a661f41d96a08 Mon Sep 17 00:00:00 2001 From: Matej Kafka <6414091+MatejKafka@users.noreply.github.com> Date: Mon, 6 May 2024 17:56:45 +0200 Subject: [PATCH] Fix utf-8 encoding check in docs.py (#2147) --- scripts/docs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/docs.py b/scripts/docs.py index 352930ea..15f73008 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -60,7 +60,8 @@ else: # warn if the user has different encoding than utf-8 encoding = locale.getpreferredencoding() -if encoding != "UTF-8": +# use casefold, since the string may be "UTF-8" on some platforms and "utf-8" on others +if encoding.casefold() != "utf-8": print("******") print(f"Your encoding ({encoding}) is different than UTF-8. pwndbg might not work properly.") print("You might try launching GDB with:")