diff options
author | Christian Hesse <mail@eworm.de> | 2020-09-01 10:09:00 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-09-01 10:09:00 +0200 |
commit | db5adbeae09b8b80587294e4de125af109b8ecdc (patch) | |
tree | f7f74a71a5770ae092b46db6f576514bb0684ff5 /CRT.c | |
parent | f5b3e8d2a355e71720cbe3893ddf395dce746572 (diff) |
add option (-U, --no-unicode) to disable unicode at runtime
Diffstat (limited to 'CRT.c')
-rw-r--r-- | CRT.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -667,7 +667,7 @@ void CRT_restorePrivileges() { // TODO: pass an instance of Settings instead. -void CRT_init(int delay, int colorScheme) { +void CRT_init(int delay, int colorScheme, bool allowUnicode) { initscr(); noecho(); CRT_delay = delay; @@ -733,10 +733,12 @@ void CRT_init(int delay, int colorScheme) { setlocale(LC_CTYPE, ""); #ifdef HAVE_LIBNCURSESW - if(strcmp(nl_langinfo(CODESET), "UTF-8") == 0) + if (allowUnicode && strcmp(nl_langinfo(CODESET), "UTF-8") == 0) CRT_utf8 = true; else CRT_utf8 = false; +#else + (void) allowUnicode; #endif CRT_treeStr = |