Fix for Solaris bug 6447517: Cannot login to JDS desktop for Egyptian and
Saudi Arabic UTF-8 locales (ar_EG, ar_SA)
This was root caused to the decimal separator for the Arabic UTF-8 locales
being set to U+066b (oxd9ab) while for the non UTF-8 "ar" locale this is 0x2c.
Adds code to setlocale before attempting to read fonts.conf file.
Reset the locale after reading file.
diff -urp -x '*~' -x '*.orig' src/fcxml.c src/fcxml.c
--- src/fcxml.c 2009-11-16 14:46:18.000000000 -0800
+++ src/fcxml.c 2010-05-10 15:00:04.697920803 -0700
@@ -2456,6 +2456,9 @@ FcConfigParseAndLoad (FcConfig *conf
void *buf;
#endif
+ char *cur_locale = setlocale (LC_NUMERIC, NULL);
+ setlocale (LC_NUMERIC, "C");
+
filename = FcConfigFilename (name);
if (!filename)
goto bail0;
@@ -2555,6 +2558,7 @@ bail1:
close (fd);
fd = -1;
bail0:
+ setlocale (LC_NUMERIC, cur_locale);
if (error && complain)
{
if (name)