[mono/mono] 8f026e3e: Fallback to $LANG if $LC_ALL isn't set.

"Jonathan Pryor ([email protected])" <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <0000014193cc5800-91eca91f-e30d-421f-9b54-0a5834a6d61a-000000@email.amazonses.com>
   Branch: refs/heads/xamarin/monodroid-4.8.2-branch
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/3618f98f4516...8f026e3ef418

   Commit: 8f026e3ef418c113672dadbc09ff356a69de1134
   Author: Jonathan Pryor <[email protected]> (jonpryor)
     Date: 2013-10-07 16:40:57 GMT
      URL: https://github.com/mono/mono/commit/8f026e3ef418c113672dadbc09ff356a69de1134

Fallback to $LANG if $LC_ALL isn't set.

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15214

This is a regression introduced in be532638.

Xamarin.Android assumes that the $LANG environment variable can be
used to control System.Globalization.CultureInfo.CurrentCulture,
setting LANG based on the current Java locale.

This was broken in be532638 because $LANG was no longer being checked
to determine the default locale, as $LC_ALL was not set.

Fix the fallback logic so that $LANG is checked when $LC_ALL is not.

Changed paths:
  M mono/metadata/locales.c

Modified: mono/metadata/locales.c
===================================================================
@@ -402,7 +402,7 @@ static gint32 string_invariant_indexof_char (MonoString *source, gint32 sindex,
 	const char *locale;
 
 	locale = g_getenv ("LC_ALL");
-	if (locale != NULL){
+	if (locale == NULL) {
 		locale = g_getenv ("LANG");
 		if (locale == NULL)
 			locale = setlocale (LC_ALL, NULL);


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.