mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02: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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user