summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2012-06-08 15:47:52 +0900
committerAkira TAGOH <akira@tagoh.org>2012-06-08 15:47:52 +0900
commit2261a64ce14d692f7c553f46e2158e70400dbc9c (patch)
tree04da0a3881fb5a2abbcf959eaf2e8e43f95c168b
parentbbc8fb5ba705e5257693f3b266fce12d2f81b50c (diff)
downloadfontconfig-2261a64ce14d692f7c553f46e2158e70400dbc9c.tar.gz
fcdefault: fallback if the environment variables are empty
try to fallback if FC_LANG, LC_ALL, LC_CTYPE and LANG is empty
-rw-r--r--src/fcdefault.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fcdefault.c b/src/fcdefault.c
index 674374c..ce90a88 100644
--- a/src/fcdefault.c
+++ b/src/fcdefault.c
@@ -46,13 +46,13 @@ FcGetDefaultLangs (void)
char *langs;
langs = getenv ("FC_LANG");
- if (!langs)
+ if (!langs || !langs[0])
langs = getenv ("LC_ALL");
- if (!langs)
+ if (!langs || !langs[0])
langs = getenv ("LC_CTYPE");
- if (!langs)
+ if (!langs || !langs[0])
langs = getenv ("LANG");
- if (langs)
+ if (langs && langs[0])
{
if (!FcStrSetAddLangs (result, langs))
FcStrSetAdd (result, (const FcChar8 *) "en");