Summary: | fontconfig-2.13.0 globally sets the locale from the environment | ||
---|---|---|---|
Product: | fontconfig | Reporter: | Ulrich Müller <ulm> |
Component: | library | Assignee: | fontconfig-bugs |
Status: | RESOLVED FIXED | QA Contact: | Behdad Esfahbod <freedesktop> |
Severity: | normal | ||
Priority: | medium | CC: | akira |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ulrich Müller
2018-03-13 21:20:07 UTC
fixed in git 923b5be. thanks. (In reply to Akira TAGOH from comment #1) > fixed in git 923b5be. thanks. Unfortunately, this doesn't fix it. The following will still break Emacs (e.g. latest released version 25.3): $ unset LANG LC_ALL $ LC_NUMERIC=de_DE.UTF-8 emacs -Q Hm, okay. I should leave the locale setting to applications then even though one might misses features if they don't do the right thing there. removed the locale related code in git. Ah, silly me: fixed by commit 98eaef69af1350e459bf9c175476d3b772968874 Author: Akira TAGOH <akira@tagoh.org> Date: Thu Mar 15 12:17:52 2018 +0900 Leave the locale setting to applications https://bugs.freedesktop.org/show_bug.cgi?id=105492 Although this thread indicates that the problem has been resolved, this does not seem to be the case in the current git source. The changes introduced by 98eaef69 are still present. I.e. in multiple places the code calls setlocale(LC_all,""). This clobbers the current locale settings established by the callling program. I got here by debugging a problem reported against current gnuplot that so far as I can tell is directly caused by this change to libfontconfig. The program sets and relies on LC_NUMERIC == "C", but after calling into libfontconfig this may have been changed to something else. In particular if the default locale from the environment uses comma as a decimal point, bad things happen. I suggest that 98eaef69 be reverted. A library call should not change the caller's locale. I don't see what exactly issues you are facing. there are no code such as calling setlocale in the latest library anymore but keeps it in standalone tools. that shouldn't affects other programs. plus, 98eaef69 is to revert changes like 923b5be6 and 9a0fcb94, and it is same what you were complaining. you seem getting confused. anyway, please mention what version of fontconfig you were trying and check if it is the latest or not. if you are using fontconfig from the package of any distro, please ask for maintainer to fix this. this has been fixed in 2.13.1 anyway. |
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.