mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
init_lang(): properly invoke setlocale() for LANG
This commit is contained in:
parent
e3c14ed569
commit
002f65fb54
@ -690,7 +690,7 @@ init_banner(const notcurses* nc){
|
|||||||
static void
|
static void
|
||||||
init_lang(const notcurses_options* opts){
|
init_lang(const notcurses_options* opts){
|
||||||
if(!(opts->flags & NCOPTION_INHIBIT_SETLOCALE)){
|
if(!(opts->flags & NCOPTION_INHIBIT_SETLOCALE)){
|
||||||
const char* locale = setlocale(LC_ALL, NULL);
|
const char* locale = setlocale(LC_ALL, "");
|
||||||
if(locale && (!strcmp(locale, "C") || !strcmp(locale, "POSIX"))){
|
if(locale && (!strcmp(locale, "C") || !strcmp(locale, "POSIX"))){
|
||||||
const char* lang = getenv("LANG");
|
const char* lang = getenv("LANG");
|
||||||
if(lang){
|
if(lang){
|
||||||
|
Loading…
Reference in New Issue
Block a user