[Gambas-user] Combobox1.sort=true sorts different then Astring.sort

manuel viet gambas at ...1828...
Wed Jan 9 16:34:04 CET 2008



gaupe wrote:
> 
> 
> My meaning however stays that i now have to, in one language constantly
> think.
> 
> 
> ehhh... sort was it the interpreter was it qt was it sometehing else...
> 
> it gets confusing 
> 
> same with the utf-8 thingy in gambas
> 
> as soon as you go out of the standard simple ascii you suddenly are
> confronted with the fact that
> asc and chr do not get utf-8
> and have to use other means like string.length and so on to solve it.
> 
> would be nice in my opinion that all would use One standard.
> 
> 

IMHO, sorting twice the same array is counter productive.
Of course it doesn't matter for a couple of values (even
for a couple hundred values) but it can impact performances
badly if you're doing that in the (more than) thousand range.

When the array is made of strings, the obvious standard is
to stick to UTF-8 and strings methods. I don't know really
for Gambas, but those functions should be localized,
and the sorting order depends on the language of the writer.

For instance, 'e' and 'é' are the same letter in french but
are not the same ascii char. Ditto for all diacritics, depending
on the language. I suspect it might be even worse for some
other languages. Is 'þ' a 't' in old english ? Is it before 'ð' ?
Is 'æ' only a 'a' in latin or should it be considered to be
the two letters AE ?

My advice is to never ever in any language and under any
circumstances mess with the strings manipulation functions.
Direct byte access of strings is really a thing of the past.

-----
-- 
Manuel Viet
-- 
View this message in context: http://www.nabble.com/Combobox1.sort%3Dtrue-sorts-different-then-Astring.sort-tp14709719p14714196.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list