Page 1 of 1
Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 8:00 pm
by kaveh1000
I have a set of 35 non-ascii characters. When I sort them in BBEdit on Mac, I get what seems to be the correct order, namely:
Code: Select all
á
à
â
ä
ã
æ
ć
č
é
è
ê
ě
ë
í
ì
ĭ
î
ï
ń
ó
ò
ô
ö
ø
ř
Ś
š
ú
ù
û
ü
ý
ỳ
ŷ
ž
but in LiveCode, using
the result is
Code: Select all
ý
á
à
â
ä
ã
é
è
ê
ë
í
ì
î
ï
ó
ò
ô
ö
ú
ù
û
ü
æ
ø
ć
č
ě
ĭ
ń
ř
Ś
š
ŷ
ž
ỳ
Any ideas please?
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 8:25 pm
by Klaus
I get the same as you in BBedit when I use:
...
sort fld 1 international
...
macOS 10.14.6, LC 9.5
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 8:31 pm
by kaveh1000
Oh I did not know about sort international. It works! Thank you so much Klaus, as ever.
Regards
Kaveh
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 8:38 pm
by FourthWorld
This came up on the use-livecode discussion list last month. Mark Waddingham noted that the bug is limited to sorting Unicode characters in a variable, but works well in a field. He also offered a workaround for sorting vars:
http://lists.runrev.com/pipermail/use-l ... 56110.html
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 8:48 pm
by Klaus
kaveh1000 wrote: ↑Sun Oct 20, 2019 8:31 pm
Oh I did not know about sort international
Hard to believe, but I ALWAYS read up the complete entry in the dictionary
if a keyword or command does not behave as I (sic!) exspected!
Well, and sometimes also just for fun.
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 9:10 pm
by FourthWorld
Klaus wrote: ↑Sun Oct 20, 2019 8:48 pm
kaveh1000 wrote: ↑Sun Oct 20, 2019 8:31 pm
Oh I did not know about sort international
Hard to believe, but I ALWAYS read up the complete entry in the dictionary
if a keyword or command does not behave as I (sic!) exspected!
Well, and sometimes also just for fun.
I used to when the formatting was legible. After moving it from the robust LC format to the web we still have a lot of entries that could use more line breaks.
Re: Sorting Unicode chars not quite right
Posted: Sun Oct 20, 2019 9:37 pm
by kaveh1000
At least I know it was not a silly error on my part! And yes, I did try the field Richard and noticed it was different, but I forgot about it after trying a few other things!