Q: jquery DataTables sorting incorrectly I have a .net core project, using entity framework and jquery Data Tables. I pull a table from my sql database, sorted by Name, and everything is fine. When I add the data table to it, it sorts it incorrectly. It does half of the items (not exactly half, just a first bit of them) A-Z, then starts over at A again all over again. so like
Adam
Alex
Ben
Caroline
...
Victoria
Xander
Zeke
Aaron
Andrew
Bennet
...
Yolanda
The data in the table looks fine, I can't see any weird encoding. Its fine when I order it using entity framework. But when I add the datatable functionality it doesn't work.
The Datatable code looks like this
 var itemTable= $(".mytable").DataTable({
            aoColumnDefs: [
                { orderable: false, aTargets: [6] },
                { width: "40px", aTargets: [1] },
                { width: "70px", aTargets: [2] },
                { visible: false, aTargets: [10, 12] },
                { orderable: true, "targets": [[0, "asc"]]}
            ]
    });

Any places to look are greatly appreciated!
Update: I copied the whole sql table into a different db (local) and tried it there... worked fine. Something weird in the encoding that got stripped when I copied it into a CSV and back into a different table? but I can't see any characters in the db that are not regular characters

A: I found it! There were hidden quotation marks on some of the entries in SQL! There was a trailing or leading space being added on some items, which made sql add the double quotes.
I found them by doing select * from mytable, right clicking on the results and clicking save as, then chose CSV file. Opened that CSV in Notepad++ and they appeared
I fixed all rows by running this query:
update People set Name = LTRIM(RTRIM(Name))

