mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Default to utf-8 on Windows
If it fails, we'll fall back to the system codepage
This commit is contained in:
parent
4e7466a21c
commit
8d7e2d0058
1 changed files with 4 additions and 1 deletions
|
@ -17,7 +17,10 @@ def get_encodings():
|
|||
'''
|
||||
return a list of string encodings to try
|
||||
'''
|
||||
encodings = [__salt_system_encoding__]
|
||||
if salt.utils.is_windows():
|
||||
encodings = ['utf-8', __salt_system_encoding__]
|
||||
else:
|
||||
encodings = [__salt_system_encoding__]
|
||||
|
||||
try:
|
||||
sys_enc = sys.getdefaultencoding()
|
||||
|
|
Loading…
Add table
Reference in a new issue