From 89a1a1be54eefe77cc04401526ea22323c644115 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 31 Jul 2016 09:29:13 +0000 Subject: Autodetect a suitable locale for -Tutf8 mode, and allow overriding it manually. Based on a patch from Svyatoslav Mishyn tweaked by me. The idea originally came up in a conversation with Markus Waldeck. --- term_ascii.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'term_ascii.c') diff --git a/term_ascii.c b/term_ascii.c index fecdb0a9..df5ff139 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.53 2016/07/08 22:29:05 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.54 2016/07/31 09:29:13 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -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; -- cgit v1.2.3