File tree Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Expand file tree Collapse file tree 2 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -617,22 +617,19 @@ def getpreferredencoding(do_setlocale = True):
617617 except Error :
618618 pass
619619 result = nl_langinfo (CODESET )
620- if not result and sys .platform == 'darwin' :
621- # nl_langinfo can return an empty string
622- # when the setting has an invalid value.
623- # Default to UTF-8 in that case because
624- # UTF-8 is the default charset on OSX and
625- # returning nothing will crash the
626- # interpreter.
627- result = 'UTF-8'
628-
629620 setlocale (LC_CTYPE , oldloc )
630- return result
631621 else :
632622 result = nl_langinfo (CODESET )
633- if not result and sys .platform == 'darwin' :
634- # See above for explanation
635- result = 'UTF-8'
623+
624+ if not result and sys .platform == 'darwin' :
625+ # nl_langinfo can return an empty string
626+ # when the setting has an invalid value.
627+ # Default to UTF-8 in that case because
628+ # UTF-8 is the default charset on OSX and
629+ # returning nothing will crash the
630+ # interpreter.
631+ result = 'UTF-8'
632+ return result
636633
637634
638635### Database
Original file line number Diff line number Diff line change @@ -904,6 +904,7 @@ Arnaud Mazin
904904Pam McA'Nulty
905905Matt McClure
906906Rebecca McCreary
907+ Sean McCully
907908Kirk McDonald
908909Chris McDonough
909910Greg McFarlane
You can’t perform that action at this time.
0 commit comments