aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r--gcc/cppmain.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index 7e12d6b..f3bf2a0 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -129,9 +129,16 @@ general_init (const char *argv0)
xmalloc_set_program_name (progname);
+/* 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);
}