* cygpath.cc (main): Only setlocale for LC_CTYPE category. Fallback
to UTF-8 if locale is "C". * ldd.cc (main): Ditto. * mkgroup.c (main): Ditto. * mkpasswd.c (main): Ditto. * passwd.c (main): Ditto.
This commit is contained in:
@@ -408,8 +408,10 @@ main (int argc, char **argv)
|
||||
if (c)
|
||||
*c = '\0';
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
/* Use locale from environment. If not set or set to "C", use UTF-8. */
|
||||
setlocale (LC_CTYPE, "");
|
||||
if (!strcmp (setlocale (LC_CTYPE, NULL), "C"))
|
||||
setlocale (LC_CTYPE, "en_US.UTF-8");
|
||||
while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
|
||||
switch (opt)
|
||||
{
|
||||
|
Reference in New Issue
Block a user