summaryrefslogtreecommitdiffstats
path: root/bin/sh/main.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-05-06 22:31:27 +0000
committerjilles <jilles@FreeBSD.org>2011-05-06 22:31:27 +0000
commit6672b66ab789f3a873bf4afedd4e33f79c47960d (patch)
treee050eac60e8f976d2dc8403b5f48b7fee966845d /bin/sh/main.c
parentd5f31a325b1e05306848b941346f144f410e2097 (diff)
downloadFreeBSD-src-6672b66ab789f3a873bf4afedd4e33f79c47960d.zip
FreeBSD-src-6672b66ab789f3a873bf4afedd4e33f79c47960d.tar.gz
sh: Track if the current locale's charset is UTF-8 or not.
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r--bin/sh/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 12a7ff2..d3250eb 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$");
int rootpid;
int rootshell;
struct jmploc main_handler;
+int localeisutf8;
static void read_profile(const char *);
static char *find_dot_file(char *);
@@ -96,6 +97,7 @@ main(int argc, char *argv[])
char *shinit;
(void) setlocale(LC_ALL, "");
+ updatecharset();
state = 0;
if (setjmp(main_handler.loc)) {
switch (exception) {
OpenPOWER on IntegriCloud