diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2011-04-03 21:11:28 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2011-04-03 21:11:28 +0000 |
commit | 2357b4ca6f82083e9d2c1f937c45570e4817d7dc (patch) | |
tree | 4093a25becf8df8af867483097c5d796aa5298de /usr.bin | |
parent | 7e8e7dd2507c9a05dbe828056d9e072121a91404 (diff) |
Call setlocale() to avoid display glitches in UTF-8 locales.
ok phessler nicm mikeb
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/hexdump/hexdump.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/hexdump/hexdump.c b/usr.bin/hexdump/hexdump.c index 9ef015db76c..fc67538ec46 100644 --- a/usr.bin/hexdump/hexdump.c +++ b/usr.bin/hexdump/hexdump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hexdump.c,v 1.14 2010/10/12 17:23:21 millert Exp $ */ +/* $OpenBSD: hexdump.c,v 1.15 2011/04/03 21:10:45 stsp Exp $ */ /* $NetBSD: hexdump.c,v 1.7 1997/10/19 02:34:06 lukem Exp $ */ /* @@ -32,6 +32,7 @@ #include <sys/param.h> #include <err.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -73,6 +74,7 @@ main(int argc, char *argv[]) rewrite(tfs); (void)next(argv); + (void)setlocale(LC_CTYPE, ""); display(); exit(exitval); } |