diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-31 09:29:13 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-07-31 09:29:13 +0000 |
commit | d4ebaa0831cda5cc57b037351bd6504d3c4d3fff (patch) | |
tree | 5196411adebb8bc75eb0f875620538214a531fd3 /term_ascii.c | |
parent | 0d9bd7d60231be1d0bb037d4fec130b0b01ad128 (diff) | |
download | mandoc-d4ebaa0831cda5cc57b037351bd6504d3c4d3fff.tar.gz |
Autodetect a suitable locale for -Tutf8 mode,
and allow overriding it manually.
Based on a patch from Svyatoslav Mishyn <juef at openmailbox dot org>
tweaked by me.
The idea originally came up in a conversation with Markus Waldeck.
Diffstat (limited to 'term_ascii.c')
-rw-r--r-- | term_ascii.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/term_ascii.c b/term_ascii.c index 1ba4c6c9..ee05c09f 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -98,7 +98,7 @@ ascii_init(enum termenc enc, const struct manoutput *outopts) v = TERMENC_LOCALE == enc ? setlocale(LC_CTYPE, "") : - setlocale(LC_CTYPE, "en_US.UTF-8"); + setlocale(LC_CTYPE, UTF8_LOCALE); if (NULL != v && MB_CUR_MAX > 1) { p->enc = enc; p->advance = locale_advance; |