|
@@ -704,12 +704,12 @@ def RunCommand(prog, flags = "", overwrite = False, quiet = False, verbose = Fal
|
|
|
def GetDefaultEncoding(forceUTF8 = False):
|
|
|
"""!Get default system encoding
|
|
|
|
|
|
- @param forceUTF8 return UTF8 when encoding is not defined
|
|
|
+ @param forceUTF8 force 'UTF-8' if encoding is not defined
|
|
|
|
|
|
@return system encoding (can be None)
|
|
|
"""
|
|
|
enc = locale.getdefaultlocale()[1]
|
|
|
- if forceUTF8 and (enc is None or enc != 'UTF8'):
|
|
|
+ if forceUTF8 and (enc is None or enc == 'UTF8'):
|
|
|
return 'UTF-8'
|
|
|
|
|
|
Debug.msg(1, "GetSystemEncoding(): %s" % enc)
|