Global: better handling locales

This commit is contained in:
Carter Li
2024-06-07 10:00:30 +08:00
parent 896468195a
commit 5df5bbf85b
3 changed files with 14 additions and 10 deletions
+2 -4
View File
@@ -33,8 +33,7 @@ static inline uint32_t getWcsWidth(const FFstrbuf* mbstr, wchar_t* wstr, mbstate
void ffPrintSeparator(FFSeparatorOptions* options)
{
setlocale(LC_ALL, "");
setlocale(LC_CTYPE, "");
mbstate_t state = {};
bool fqdn = instance.config.modules.title.fqdn;
const FFPlatform* platform = &instance.state.platform;
@@ -90,8 +89,7 @@ void ffPrintSeparator(FFSeparatorOptions* options)
}
}
putchar('\n');
setlocale(LC_ALL, "C");
setlocale(LC_CTYPE, "C");
}
bool ffParseSeparatorCommandOptions(FFSeparatorOptions* options, const char* key, const char* value)