Index: js/widgets/Grid.js =================================================================== --- js/widgets/Grid.js (revision 81409) +++ js/widgets/Grid.js (working copy) @@ -235,16 +235,24 @@ if (column.hasOwnProperty('sortFormatter')) { sortFormatter = column.sortFormatter; } + var stringCompare = function() { + if (typeof(Intl) === 'object' && typeof(Intl.Collator) === 'function') { + var intlCollator = new Intl.Collator(kernel.locale, {numeric: true}); + return function(a, b) { + return intlCollator.compare(a, b) < 0; + }; + } + return function(a, b) { + return a.toLowerCase() < b.toLowerCase(); + }; + }(); var compare = function(aValue, bValue) { var a = sortFormatter(aValue); var b = sortFormatter(bValue); - if (typeof(a.localeCompare) === 'function') { - return a.localeCompare(b, kernel.locale, {numeric: true}) < 0; - } else if (typeof(a.toLowerCase) === 'function') { - return a.toLowerCase() < b.toLowerCase(); - } else { - return a < b; + if (typeof(a) === 'string' && typeof(b) === 'string') { + return stringCompare(a, b); } + return a < b; }; return function(data) { var comparison;