kpg9 kpg9 - 11 months ago 86
Javascript Question

JavaScript Table Sorting accented characters with sorttable

I'm trying to make a sortable HTML table with Sorttable Which's code is here

And it works just fine but I have some words with accented first characters (especially Á) in the

<td>
s and it just throws them after the Z.

I tried some ideas but I'm a beginner at Javascript and I couldn't make it work.

So please help me:
How can I make some changes in the code to sort the accented characters correctly?

Answer Source

You need to use the sortLocaleCompare property to true:

$("#myTable").tablesorter({
    sortLocaleCompare : true
});

More Information