View Single Post
08/22/15, 06:57 AM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by CrazyDutchGuy View Post
I assume the sorting is based on type, then the order with base 36 as next
0123456789abcdefghijklmnopqrstuvwxyz, if they are equal then sorting is based on case ?

comparing other values would likely produce a nil value as it can't convert it to a number for comaprison, which leads to a nil, which leads to type inequality, which leads to false, if it all makes sense somehow
The default operator < in Lua requires that both operands are of the same type:
http://www.lua.org/source/5.1/lvm.c.html#luaV_lessthan

Strings are compared using strcoll:
http://www.lua.org/source/5.1/lvm.c.html#l_strcmp

What we have in ESO is some custom-made string comparison. Perhaps it supports multi-byte UTF-8 characters, I haven't checked that. It doesn't support ASCII punctuation, that's broken enough in my eyes