Fix utf-8 encoding check in docs.py (#2147)

This commit is contained in:
Matej Kafka 2024-05-06 17:56:45 +02:00 committed by GitHub
parent c2ace79eac
commit d6408b98a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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:")