Skip to content

Commit

Permalink
sopel: Update to check for proper UTF8 on Windows
Browse files Browse the repository at this point in the history
The locale.getlocale() check currently looks for UTF-8 only, however
on windows with powershell and UTF8 enabled the return value is utf8
so this check still fails.
  • Loading branch information
Gizmokid2005 committed Nov 1, 2021
1 parent 07875e7 commit 249a05a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sopel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]

loc = locale.getlocale()
if not loc[1] or 'UTF-8' not in loc[1]:
if not loc[1] or ('UTF-8' not in loc[1] and 'utf8' not in loc[1]):
print('WARNING!!! You are running with a non-UTF8 locale environment '
'variable (e.g. LC_ALL is set to "C"), which makes Python 3 do '
'stupid things. If you get strange errors, please set it to '
Expand Down

0 comments on commit 249a05a

Please sign in to comment.