mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
notcurses_init(): mention setlocale in error
If notcurses_init() fails due to a bad encoding, it's probably because someone didn't call setlocale(3). Make a suggestion in the error message. Resolves #414.
This commit is contained in:
parent
060c0c2a47
commit
fbd222b04a
@ -843,7 +843,7 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
|
||||
}
|
||||
const char* encoding = nl_langinfo(CODESET);
|
||||
if(encoding == NULL || (strcmp(encoding, "ANSI_X3.4-1968") && strcmp(encoding, "UTF-8"))){
|
||||
fprintf(stderr, "Encoding (\"%s\") was neither ANSI_X3.4-1968 nor UTF-8, refusing to start\n",
|
||||
fprintf(stderr, "Encoding (\"%s\") was neither ANSI_X3.4-1968 nor UTF-8, refusing to start\n Did you call setlocale()?\n",
|
||||
encoding ? encoding : "none found");
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user