tzsetup: Fix unicode support

Differential revision:	https://reviews.freebsd.org/D33532
This commit is contained in:
Alfonso Siciliano 2021-12-17 09:25:07 +01:00 committed by Baptiste Daroussin
parent 65dd321054
commit be0236ebd8

View File

@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#ifdef HAVE_BSDDIALOG
#include <bsddialog.h>
#include <locale.h>
#endif
#define _PATH_ZONETAB "/usr/share/zoneinfo/zone1970.tab"
@ -868,6 +869,10 @@ main(int argc, char **argv)
skiputc = 0;
#ifdef HAVE_BSDDIALOG
setlocale(LC_ALL, "");
#endif
/* Default skiputc to 1 for VM guests */
if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) == 0 &&
strcmp(vm_guest, "none") != 0)