Skip to content

Instantly share code, notes, and snippets.

@atton
Last active August 23, 2016 02:51
Show Gist options
  • Save atton/ae3a5594e974a2ddca93b5eb4a2eb261 to your computer and use it in GitHub Desktop.
Save atton/ae3a5594e974a2ddca93b5eb4a2eb261 to your computer and use it in GitHub Desktop.
Set locale for tmux 2.2
diff --git tmux.c tmux.c
index cf82110..d2c57b8 100644
--- tmux.c
+++ tmux.c
@@ -193,12 +193,7 @@ main(int argc, char **argv)
int opt, flags, keys;
if (setlocale(LC_CTYPE, "en_US.UTF-8") == NULL) {
- if (setlocale(LC_CTYPE, "") == NULL)
- errx(1, "invalid LC_ALL, LC_CTYPE or LANG");
- s = nl_langinfo(CODESET);
- if (strcasecmp(s, "UTF-8") != 0 &&
- strcasecmp(s, "UTF8") != 0)
- errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s);
+ errx(1, "invalid LC_CTYPE");
}
setlocale(LC_TIME, "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment