Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-05-15 15:30:18 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-05-15 15:30:18 +0400
commit73535010d72d1a7d46e4f5c6c98f41fab90df489 (patch)
treec704e4155e42372132a39c6f4fbc5d4cc31afda0 /winsup/utils/ldd.cc
parenta972ea99d54c5834eb0bd8d5e40e1045d2e21d3f (diff)
* 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.
Diffstat (limited to 'winsup/utils/ldd.cc')
-rw-r--r--winsup/utils/ldd.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/utils/ldd.cc b/winsup/utils/ldd.cc
index 7a7e04ab9..b2d6f7b92 100644
--- a/winsup/utils/ldd.cc
+++ b/winsup/utils/ldd.cc
@@ -327,7 +327,11 @@ main (int argc, char **argv)
{
int optch;
int index;
- 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 ((optch = getopt_long (argc, argv, "dru", longopts, &index)) != -1)
switch (optch)
{