mirror of
https://github.com/ip7z/7zip.git
synced 2025-12-06 07:12:00 +01:00
do not break things if locale is not installed
This commit is contained in:
parent
299982cc8d
commit
7be55ef26c
|
|
@ -558,6 +558,9 @@ void CItem::GetUnicodeString(UString &res, const AString &s, bool isComment, boo
|
||||||
|
|
||||||
// Detect required code page name from current locale
|
// Detect required code page name from current locale
|
||||||
char *lc = setlocale(LC_CTYPE, "");
|
char *lc = setlocale(LC_CTYPE, "");
|
||||||
|
if (!lc || !lc[0]) {
|
||||||
|
lc = getenv("LC_CTYPE");
|
||||||
|
}
|
||||||
|
|
||||||
if (lc && lc[0]) {
|
if (lc && lc[0]) {
|
||||||
// Compare up to the dot, if it exists, e.g. en_US.UTF-8
|
// Compare up to the dot, if it exists, e.g. en_US.UTF-8
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue