mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
set locales to C because en_US not installed on some systems, only UTF-8 version and en_US.UTF-8 does not work.
This commit is contained in:
parent
92f504f98d
commit
9baae3a701
6 changed files with 30 additions and 20 deletions
|
@ -25,3 +25,13 @@ inline wchar_t* chartowchar_t(const char *str)
|
|||
mbstowcs(nstr, str, l);
|
||||
return nstr;
|
||||
}
|
||||
|
||||
inline void changeCtype(const char *l)
|
||||
{
|
||||
char *ret = NULL;
|
||||
ret = setlocale(LC_CTYPE, l);
|
||||
if(ret == NULL)
|
||||
std::cout<<"locale could not be set"<<std::endl;
|
||||
else
|
||||
std::cout<<"locale has been set to:"<<ret<<std::endl;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue