mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-21 16:34:01 +01:00
Merge pull request #3037 from Lartza/fix-win-encoding
Fix SYS_ENCODING selection on Windows
This commit is contained in:
+4
-1
@@ -54,7 +54,10 @@ def main():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
locale.setlocale(locale.LC_ALL, "")
|
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):
|
except (locale.Error, IOError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user