diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2012-12-28 16:12:51 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2012-12-28 16:12:51 +0000 |
commit | f7544cb61de7d175e1e2ec4a9c08884f9f86c8a8 (patch) | |
tree | cec617df62c3e726d7e10993ce4772fd55ebe1e5 /usr.bin/mg | |
parent | 0f802021192271d749cddd44c13880fc64a6c342 (diff) |
Respect locale for ctype purposes, e.g. display ISO Latin 1 characters;
ok stsp@ reyk@
Document that multi-byte character sets are not supported; from stsp@
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/main.c | 5 | ||||
-rw-r--r-- | usr.bin/mg/mg.1 | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index ef4f3baa8dc..804db934d32 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.69 2012/08/31 18:06:42 lum Exp $ */ +/* $OpenBSD: main.c,v 1.70 2012/12/28 16:12:50 naddy Exp $ */ /* This file is in the public domain. */ @@ -12,6 +12,7 @@ #include "macro.h" #include <err.h> +#include <locale.h> int thisflag; /* flags, this command */ int lastflag; /* flags, last command */ @@ -63,6 +64,8 @@ main(int argc, char **argv) argc -= optind; argv += optind; + setlocale(LC_CTYPE, ""); + maps_init(); /* Keymaps and modes. */ funmap_init(); /* Functions. */ diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1 index fffd26ed620..3c0df23fe1d 100644 --- a/usr.bin/mg/mg.1 +++ b/usr.bin/mg/mg.1 @@ -1,7 +1,7 @@ -.\" $OpenBSD: mg.1,v 1.74 2012/12/27 18:51:52 florian Exp $ +.\" $OpenBSD: mg.1,v 1.75 2012/12/28 16:12:50 naddy Exp $ .\" This file is in the public domain. .\" -.Dd $Mdocdate: December 27 2012 $ +.Dd $Mdocdate: December 28 2012 $ .Dt MG 1 .Os .Sh NAME @@ -968,3 +968,5 @@ In order to use 8-bit characters (such as German umlauts), the Meta key needs to be disabled via the .Dq meta-key-mode command. +.Pp +Multi-byte character sets, such as UTF-8, are not supported. |