gecko-dev/intl
Makoto Kato dd679562b1 Bug 1391628 - Use fallback locale on nsICollation if locale is invalid. r=emk
Original issue is that Microsoft Dynamics CRM uses invalid lang attribute in <xsl:sort>.

<xsl:sort order="descending"
          select="@displayname[$sortColumnName='displayname'] |
                  @name[$sortColumnName='name'] |
                  exslt:node-set($FriendlyTypeNames)/types/type[@xmlName=current()/@datatype and $sortColumnName='datatype']"
          lang="$languageName"/>

Our XSLT implementation detects "$languageName" as locale name, then use it to nsICollation.

Until Gecko 54 for Windows, even if using invalid locale name for nsICollation, it uses platform locale as fallback.  But from 55, we use same implementation as macOS's to use ICU.  So this issue occurs.  ICU implementation doesn't use fallback locale if it is invalid.

We should use fallback locale if locale is invalid.  Most code for fallback locale such as FallbackEncoding uses application locale, so use it.

MozReview-Commit-ID: EKYkZG7Hnz0

--HG--
extra : rebase_source : fec89c67317d7df041f3b237122fb7e20e32fe1b
2017-08-24 23:13:42 +09:00
..
build Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. r=emk. 2017-08-04 12:37:53 +03:00
chardet Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
encoding_glue Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor. 2017-06-13 13:23:23 +03:00
gtest Bug 1374629 - Add mozilla::NotNull to mozilla::Encoding constant declarations. r=froydnj,hsivonen 2017-06-20 22:04:18 +09:00
hyphenation Bug 1390550 - Update to latest libhyphen code from upstream. r=ryanvm 2017-08-17 09:58:29 +01:00
icu Bug 1380083 - Pull in upstream ICU patch that changes '\' to '/' in #include. r=andre,m_kato 2017-07-12 12:34:50 -05:00
icu-patches Bug 1380083 - Pull in upstream ICU patch that changes '\' to '/' in #include. r=andre,m_kato 2017-07-12 12:34:50 -05:00
l10n Bug 1347800 - Add Localization API for Gecko. r=mossop 2017-06-02 10:36:56 +02:00
locale Bug 1391628 - Use fallback locale on nsICollation if locale is invalid. r=emk 2017-08-24 23:13:42 +09:00
locales Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
lwbrk Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
strres Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm. 2017-08-21 20:01:27 +10:00
tzdata Bug 1353649 - Update tzdata in ICU data files to 2017b. r=Waldo 2017-04-05 10:49:53 +02:00
uconv Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm. 2017-07-28 11:21:45 +10:00
unicharutil Bug 1392181 - part2: HasRTLChars() should check if the character is at least equal or larger than the minimum RTL character, U+0590 r=emk 2017-08-21 18:03:21 +09:00
Encoding.h Bug 1374629 - Add mozilla::NotNull to mozilla::Encoding constant declarations. r=froydnj,hsivonen 2017-06-20 22:04:18 +09:00
icu_sources_data.py Bug 1284406 part 3 - Export ICU headers in include/unicode. r=glandium 2016-07-20 15:00:13 +10:00
moz.build Backed out changeset fdf9ccb0b9ab (bug 1347801) for browser_all_files_referenced.js failures a=backout 2017-08-08 14:15:08 -07:00
update-icu.sh Bug 1380083 - Pull in upstream ICU patch that changes '\' to '/' in #include. r=andre,m_kato 2017-07-12 12:34:50 -05:00
update-tzdata.sh Bug 1324240 - Also set LANGUAGE environment variable to ensure svn uses English instead of the OS locale. r=Waldo 2017-04-05 10:41:42 +02:00