aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcov.c')
-rw-r--r--gcc/gcov.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gcov.c b/gcc/gcov.c
index a1c57e5..457c4ad 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -242,9 +242,16 @@ main (argc, argv)
int argc;
char **argv;
{
+/* LC_CTYPE determines the character set used by the terminal so it has be set
+ to output messages correctly. */
+
#ifdef HAVE_LC_MESSAGES
+ setlocale (LC_CTYPE, "");
setlocale (LC_MESSAGES, "");
+#else
+ setlocale (LC_ALL, "");
#endif
+
(void) bindtextdomain (PACKAGE, localedir);
(void) textdomain (PACKAGE);