Sorting of strings ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorting of strings ...

Marten Feldtmann-4
... actually I was not really aware of this (or I can not remember it).


Evaluated in a workspace:


               Dolphin 7    VisualWorks    VASmalltalk    Gemstone/S (Jade)     Pharo 4.0  

'a' < 'ö'        true          true           false           true                 true



 Marten

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

Marten Feldtmann-4
Evaluated under Windows with VASmalltalk 8.6.2 (under locale german-germany)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

Instantiations mailing list
In reply to this post by Marten Feldtmann-4
Please check also the ordering of capital letters. E.G. the applications list in the application browser.
Oharo and VAST differed here once. Not sure about now

MSKSomething
MskSomething
mskSomething

There are even differences among the VAST versions as far as I can remember.

Sebastian


On 2016-01-14 12:08 AM, Marten Feldtmann wrote:
... actually I was not really aware of this (or I can not remember it).


Evaluated in a workspace:


               Dolphin 7    VisualWorks    VASmalltalk    Gemstone/S (Jade)     Pharo 4.0  

'a' < 'ö'        true          true           false           true                 true



 Marten
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

jtuchel
In reply to this post by Marten Feldtmann-4
Hi Marten,

Collation of Umlauts is also wrong on Linux with de_DE.iso8859-1 or -15@euro

funny you mention it, but we just got a ticket from a customer who complained about wrong sorting of last names ... Names starting with Umlauts are displayed before names starting with "A"...

It seems VAST has its own implementation of collation instead of using the data from the OS locale.

Joachim




Am Donnerstag, 14. Januar 2016 09:19:25 UTC+1 schrieb Marten Feldtmann:
Evaluated under Windows with VASmalltalk 8.6.2 (under locale german-germany)

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

Marten Feldtmann-4
In reply to this post by Marten Feldtmann-4
Ok, the method executed is

EsString> <

and is dispatched to the method

String> <=

which is a primitive.

Other methods like

LCCollate default compareString: 'a' and: 'ö' 

NlsGlobals::CurrentLCCollate compareString: 'a' and: 'ö'

seem to work.



--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

Adriaan van Os-3
Some observations from a fresh 8.5.1 image

LCCollate default and NlsGlobals::CurrentLCCollate are not the same object.
The collateTable of LCCollate default is initialized.
The collateTable of NlsGlobals::CurrentLCCollate is not initialized.

LCCollate default compareString: 'ö' and: 'a' -> 3 -> Wrong
LCCollate default compareString: 'ö' and: 'z'
-> 3 -> Right

NlsGlobals::CurrentLCCollate compareString: 'ö' and: 'a'
-> 3 -> Right
NlsGlobals::CurrentLCCollate compareString: 'ö' and: 'z'
-> 2 -> Right

Is this considered to be a bug or how do LCCollate default and NlsGlobals::CurrentLCCollate relate to each other?


SequenceableCollection>>sorted uses <=. The implementation of <= in EsString uses CurrentLCCollate and should be working fine. As noted above, the implementation <= in String does not use any locale information.

'ö' <= 'a' -> true -> Wrong
'ö' <= 'z' -> true -> Right

Is this considered to be a bug or should I not use <= nor SequenceableCollection>>sorted for strings with locale sensitive characters?

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Sorting of strings ...

Adriaan van Os-3
In reply to this post by Marten Feldtmann-4
Some observations from a fresh 8.6.1 image with Dutch locale.

LCCollate default and NlsGlobals::CurrentLCCollate are not the same object.
The collateTable of LCCollate default is initialized.
The collateTable of NlsGlobals::CurrentLCCollate is not initialized.

LCCollate default compareString: 'ö' and: 'a' -> 3 -> Wrong
LCCollate default compareString: 'ö' and: 'z' -> 3 -> Right

NlsGlobals::CurrentLCCollate compareString: 'ö' and: 'a' -> 3 -> Right
NlsGlobals::CurrentLCCollate compareString: 'ö' and: 'z' -> 2 -> Right

Is this considered to be a bug or how do LCCollate default and NlsGlobals::CurrentLCCollate relate to each other?


SequenceableCollection>>sorted uses <=. The implementation of <= in EsString uses CurrentLCCollate and should be working fine. As noted above, the implementation <= in String does not use any locale information.

'ö' <= 'a' -> true -> Wrong
'ö' <= 'z' -> true -> Right

Is this considered to be a bug or should I not use <= nor SequenceableCollection>>sorted for strings with locale sensitive characters?

Cheers,
Adriaan.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.