Bug 104023 - fontconfig warning if no locales installed
Summary: fontconfig warning if no locales installed
Status: RESOLVED NOTABUG
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.11
Hardware: All Linux (All)
: medium minor
Assignee: fontconfig-bugs
QA Contact: Behdad Esfahbod
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-01 21:32 UTC by Phil Race
Modified: 2017-12-04 06:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Phil Race 2017-12-01 21:32:59 UTC
Here I am on a fully working Ubuntu 16.04 LTS and ordinarily I get no warning
$ env|grep LANG
LANG=en_US.UTF-8
$ fc-match sans
DejaVuSans.ttf: "DejaVu Sans" "Book"

But if I mimic having no locales :

$ export LANG=UTF-8
$ fc-match sans
Fontconfig warning: ignoring UTF-8: not a valid region tag
DejaVuSans.ttf: "DejaVu Sans" "Book"

So in other words if you don't install any locales on the system, fontconfig will issue this error.

This came up in a minimal new install used for some testing.
Perhaps a setting of UTF-8 should be silently ignored but
a conclusion that fontconfig should always warn in this situation is
fine by me, but I'd at least like to document it.
Comment 1 Akira TAGOH 2017-12-04 06:50:16 UTC
fontconfig warns because you set the invalid locale at the env var. not  because it isn't installed on the system. see:

$ LANG=xyz.UTF-8 locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=xyz.UTF-8
LC_CTYPE="xyz.UTF-8"
LC_NUMERIC=ja_JP.UTF-8
LC_TIME=ja_JP.UTF-8
LC_COLLATE="xyz.UTF-8"
LC_MONETARY=ja_JP.UTF-8
LC_MESSAGES="xyz.UTF-8"
LC_PAPER=ja_JP.UTF-8
LC_NAME="xyz.UTF-8"
LC_ADDRESS="xyz.UTF-8"
LC_TELEPHONE="xyz.UTF-8"
LC_MEASUREMENT=ja_JP.UTF-8
LC_IDENTIFICATION="xyz.UTF-8"
LC_ALL=
$ LANG=xyz.UTF-8 fc-match
DejaVuSans.ttf: "DejaVu Sans" "Book"


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.