javascript sort with unicode

If the locale in your system is set correctly then you can use localeCompare method instead of greater-than operator to compare the strings – this method is locale aware.

function sortComparer(a,b){
    return a.title.localeCompare(b.title)
};

Leave a Comment