@@ -83,14 +83,13 @@ def CaperDispatch():
83
83
84
84
def InitLocale (environ ):
85
85
# type: (Dict[str, str]) -> None
86
- """Set GLOBAL libc locale from environment, and CHECK that it's valid.
87
-
88
- Note: LC_COLLATE/LC_ALL might be necessary for glob
89
- LANG= is the default, LC_ALL= sets all of them
90
- https://unix.stackexchange.com/questions/576701/what-is-the-difference-between-lang-c-and-lc-all-c
91
- """
86
+ """Set the GLOBAL libc locale from the env, and CHECK that it's valid."""
92
87
try :
93
- locale_name = pylocale .setlocale (pylocale .LC_CTYPE , '' )
88
+ # Note: LC_ALL (rather than LC_CTYPE) makes glob order match bash
89
+ #
90
+ # https://unix.stackexchange.com/questions/576701/what-is-the-difference-between-lang-c-and-lc-all-c
91
+ # LANG= is the default, LC_ALL= sets all of them
92
+ locale_name = pylocale .setlocale (pylocale .LC_ALL , '' )
94
93
95
94
# passing None queries it
96
95
#lo = locale.setlocale(locale.LC_CTYPE, None)
@@ -109,8 +108,9 @@ def InitLocale(environ):
109
108
#log('codeset %s', codeset)
110
109
111
110
if not match .IsUtf8Codeset (codeset ):
112
- print_stderr ("oils warning: codeset %r doesn't look like UTF-8" % codeset )
113
- print_stderr (' Set OILS_LOCALE_OK=1 to remove this message' )
111
+ print_stderr ("oils warning: codeset %r doesn't look like UTF-8" %
112
+ codeset )
113
+ print_stderr (' OILS_LOCALE_OK=1 removes this message' )
114
114
115
115
116
116
# TODO: Hook up valid applets (including these) to completion
0 commit comments