mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 12:19:27 +00:00
Merge pull request #3037 from Lartza/fix-win-encoding
Fix SYS_ENCODING selection on Windows
This commit is contained in:
@@ -54,7 +54,10 @@ def main():
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_ALL, "")
|
||||
headphones.SYS_ENCODING = locale.getpreferredencoding()
|
||||
if headphones.SYS_PLATFORM == 'win32':
|
||||
headphones.SYS_ENCODING = sys.getdefaultencoding().upper()
|
||||
else:
|
||||
headphones.SYS_ENCODING = locale.getpreferredencoding()
|
||||
except (locale.Error, IOError):
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user