aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 81fe189..3fe6967 100644
--- a/src/main.c
+++ b/src/main.c
@@ -43,7 +43,7 @@ static int rv;
static bool_style_t bflag = BS_BINARY;
static tbl_style_t tflag = TS_UNSET;
-bool interactive;
+bool interactive, utf8;
const char *current_file;
static void astprocess_cli(asts_t);
@@ -119,10 +119,9 @@ usage:
}
}
- if (tflag == TS_UNSET) {
- tflag = streq(nl_langinfo(CODESET), "UTF-8")
- ? TS_UTF8 : TS_ASCII;
- }
+ utf8 = streq(nl_langinfo(CODESET), "UTF-8");
+ if (tflag == TS_UNSET)
+ tflag = utf8 ? TS_UTF8 : TS_ASCII;
argc -= optind;
argv += optind;