mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding
This commit is contained in:
@@ -180,9 +180,9 @@ class CogI18n:
|
||||
try:
|
||||
|
||||
try:
|
||||
translation_file = locale_path.open('ru')
|
||||
translation_file = locale_path.open('ru', encoding='utf-8')
|
||||
except ValueError: # We are using Windows
|
||||
translation_file = locale_path.open('r')
|
||||
translation_file = locale_path.open('r', encoding='utf-8')
|
||||
self._parse(translation_file)
|
||||
except (IOError, FileNotFoundError): # The translation is unavailable
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user