Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

169 lines (155 sloc) 4.36 kB
<!DOCTYPE html>
<meta charset="utf-8">
<title>jQuery plugin: Tablesorter 2.0 - Sorting Accented Characters</title>
<!-- jQuery -->
<script src=""></script>
<!-- Demo stuff -->
<link rel="stylesheet" href="css/jq.css">
<script src="js/chili/jquery.chili-2.2.js"></script>
<script src="js/chili/recipes.js"></script>
<script src="js/docs.js"></script>
<!-- Tablesorter: required -->
<link rel="stylesheet" href="../css/blue/style.css">
<script src="../js/jquery.tablesorter.js"></script>
<script id="js">$(function() {
// these default equivalents were obtained from a table of equivalents
// provided by sugar.js sorting alogrithms:
$.tablesorter.characterEquivalents = {
"a" : "\u00e1\u00e0\u00e2\u00e3\u00e4", // áàâãä
"A" : "\u00c1\u00c0\u00c2\u00c3\u00c4", // ÁÀÂÃÄ
"c" : "\u00e7", // ç
"C" : "\u00c7", // Ç
"e" : "\u00e9\u00e8\u00ea\u00eb", // éèêë
"E" : "\u00c9\u00c8\u00ca\u00cb", // ÉÈÊË
"i" : "\u00ed\u00ec\u0130\u00ee\u00ef", // íìIîï
"I" : "\u00cd\u00cc\u0130\u00ce\u00cf", // ÍÌIÎÏ
"o" : "\u00f3\u00f2\u00f4\u00f5\u00f6", // óòôõö
"O" : "\u00d3\u00d2\u00d4\u00d5\u00d6", // ÓÒÔÕÖ
"S" : "\u00df", // ß
"u" : "\u00fa\u00f9\u00fb\u00fc", // úùûü
"U" : "\u00da\u00d9\u00db\u00dc" // ÚÙÛÜ
// modify the above defaults as follows
$.extend( $.tablesorter.characterEquivalents, {
"ae" : "\u00e6", // expanding characters æ Æ
"AE" : "\u00c6",
"oe" : "\u00f6\u0153", // œ Œ
"OE" : "\u00d6\u0152",
"d" : "\u00f0", // Eth (ð Ð)
"D" : "\u00d0",
"o" : "\u00f3\u00f2\u00f4\u00f5", // remove ö because it's in the oe now
"O" : "\u00d3\u00d2\u00d4\u00d5" // remove Ö because it's in the OE now
// Enable use of the characterEquivalents reference
sortLocaleCompare : true,
// if false, upper case sorts BEFORE lower case
ignoreCase : true
<div id="banner">
<h2>Sorting Accented Characters</h2>
<h3>Flexible client-side table sorting</h3>
<a href="index.html">Back to documentation</a>
<div id="main">
<p class="tip">
<li>Accented characters will get replaced by their character equivalent when the <code class="hilight">sortLocaleCompare</code> option is <code class="hilight">true</code>.</li>
<li>In the javascript code block below you can see the default <code class="hilight">$.tablesorter.characterEquivalents</code> table and an example of how to extend it to include other equivalents.</li>
<li>If you have a specific language requirement, please refer to the <a href="">Language</a> wiki pages to see if it is there. If not, please consider sharing the code or even just share the character equivalents themselves.</li>
<div id="demo"><table class="tablesorter">
<th>Account #</th>
<th>First Name</th>
<th>Last Name</th>
<div id="javascript">
<pre class="js"></pre>
<div id="html">
<pre class="html"></pre>
<div class="next-up">
<hr />
Next up: <a href="example-multiple-tbodies.html">Sorting with Multiple Tbodies &rsaquo;&rsaquo;</a>
Jump to Line
Something went wrong with that request. Please try again.