I am faceing for the first time against select2 library. I have coded a search box and is working fine except for the sorting.
For now is ordering the results by an ASCII order instead Unicode.
For example:
"Lu" comes before "Lé".
However I need the opposite.
I am using alasqul.js and select2.full.js
Im testing many code lines and functions and failing for now.
Thanks in advance.
EDIT:
JS code:
arr = [ {a: "1", b: "1", c: "ham"}, {a: "2", b: "1", c: "Thór"}, {a: "3", b: "1", c: "Soçao"}]
var results = function(word) {
var limit = LIMIT_RESULTS + 1;
var out = [];
var partialLimit = 0;
var outaux = [];
// search by c:
outaux = alasql('SELECT a, b, c + "''" as n\
FROM ? WHERE c LIKE "%'+word+'%" ORDER BY c LIMIT ' + partialLimit, [arr]);
out.push.apply(out, outaux);