mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-21 22:03:18 -07:00
Changed the encoding method used and the selection of language
This commit is contained in:
parent
e673c599bb
commit
8fbe28094a
1 changed files with 3 additions and 3 deletions
|
@ -76,13 +76,13 @@ def main():
|
|||
|
||||
# If encoding is not returned, get the encoding
|
||||
if not encoding:
|
||||
encoding = locale.getencoding()
|
||||
encoding = locale.getpreferredencoding()
|
||||
|
||||
# Special handling for Windows platform
|
||||
if sys.platform == 'win32':
|
||||
# Get the user's default UI language on Windows
|
||||
# Get the user's current language settings on Windows
|
||||
windll = ctypes.windll.kernel32
|
||||
lang_id = windll.GetUserDefaultUILanguage()
|
||||
lang_id = windll.GetUserDefaultLCID()
|
||||
|
||||
# Map Windows language ID to locale identifier
|
||||
language_code = locale.windows_locale.get(lang_id, '')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue