Bug 1228755 - Map "C.UTF-8" to "en-US.UTF-8" in GetXPLocale(). r=smontagu
authorMats Palmgren <mats@mozilla.com>
Sun, 29 Nov 2015 17:58:36 +0100
changeset 308721 fcda0da2ed2aaa642b10300833a1e21e52e7f5f9
parent 308720 cc0dde3ac2a86460b9192749812bacc677f3c950
child 308722 673461c0b772b7a63fc9eb4115ae682c3a9c32e1
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmontagu
bugs1228755
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1228755 - Map "C.UTF-8" to "en-US.UTF-8" in GetXPLocale(). r=smontagu
intl/locale/unix/nsPosixLocale.cpp
--- a/intl/locale/unix/nsPosixLocale.cpp
+++ b/intl/locale/unix/nsPosixLocale.cpp
@@ -61,16 +61,20 @@ nsPosixLocale::GetXPLocale(const char* p
   char  extra[MAX_EXTRA_LEN+1];
   char  posix_locale[MAX_LOCALE_LEN+1];
 
   if (posixLocale!=nullptr) {
     if (strcmp(posixLocale,"C")==0 || strcmp(posixLocale,"POSIX")==0) {
       locale.AssignLiteral("en-US");
       return NS_OK;
     }
+    if (strcmp(posixLocale,"C.UTF-8")==0) {
+      locale.AssignLiteral("en-US.UTF-8");
+      return NS_OK;
+    }
     if (!ParseLocaleString(posixLocale,lang_code,country_code,extra,'_')) {
 //      * locale = "x-user-defined";
       // use posix if parse failed
       CopyASCIItoUTF16(nsDependentCString(posixLocale), locale);
       return NS_OK;
     }
 
     // Special case: substitute "nb" (Norwegian Bokmal) for macrolanguage