diff options
author | 2012-12-28 16:12:50 +0000 | |
---|---|---|
committer | 2012-12-28 16:12:50 +0000 | |
commit | dcbb98c82a116f144327f9461f3a377576c0fbeb (patch) | |
tree | bae922d50925be525a85c73b60545f841a44dca6 | |
parent | base on landry's remarks, stuff like .libs* and partial* shouldn't ever (diff) | |
download | wireguard-openbsd-dcbb98c82a116f144327f9461f3a377576c0fbeb.tar.xz wireguard-openbsd-dcbb98c82a116f144327f9461f3a377576c0fbeb.zip |
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@
-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. |