Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-11-10 Thread Avishai
-compare-with-correct-locale-sorting-tp4033864p4034228.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-23 Thread Michael Schnell
On 10/22/2013 03:21 PM, Bart wrote: string theory is a theoretical framework in which the point-like particles of particle physics are replaced by one-dimensional objects called strings. And it's grade of complexity resembles that of Unicode ;-) . And, IMHO,both can be avoided in (my)

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-23 Thread Michael Schnell
I forgot to mention that in fact I like to busy myself both with Unicode Strings handling in Pascal and with String theory in theoretical physics.Otherwise I would not take part in this discussion.) But in every-day life - mostly because of Unicode - I prefer using the old Turbo-Delphi rather

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-22 Thread Michael Schnell
On 10/22/2013 10:24 AM, Sven Barth wrote: I didn't know until around 1 or 2 years ago that and are supported on strings at all Nice try O:-) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-22 Thread Lukasz Sokol
On 22/10/13 09:35, Michael Schnell wrote: On 10/22/2013 10:24 AM, Sven Barth wrote: I didn't know until around 1 or 2 years ago that and are supported on strings at all Nice try O:-) -Michael -- And (probably) overloaded operators are your friends here? operator (S1, S2:

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-22 Thread Michael Schnell
I get the feeling that _Closed_/_Open_Strings_ (- http://en.wikipedia.org/wiki/String_theory#Strings ) are easier to understand and of more practical use than _Unicode_Strings_ . Thus an IDE / Language / Library that not completely hides the complexity behind Unicode (and it's different

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-21 Thread Michael Schnell
On 10/18/2013 06:16 PM, Jürgen Hestermann wrote: Who claims this? Sorry if I over-interpreted your wording. If this is not the case, why then use Unicode ? I thought Unicode is just for international *coding* of characters but not for sort order definition. In a Unicode aware

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-21 Thread Jy V
On Mon, Oct 21, 2013 at 10:24 AM, Michael Schnell mschn...@lumino.dewrote: If string compare also allows for greater vs smaller results the programming language needs to impose some sort order (and maybe a lot more locale-depending complex algorithms). This to me seems horribly complicated.

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-21 Thread Michael Schnell
On 10/21/2013 01:00 PM, Jy V wrote: this is the purpose of Collations I see: http://www.unicode.org/reports/tr10/ As expected: horribly complicated. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Michael Schnell
On 10/17/2013 09:56 PM, Hans-Peter Diettrich wrote: Jürgen Hestermann schrieb: I fully aggree on this http://www.utf8everywhere.org/ When they can be located there, a wrapper can be added to the RTL. The OP seems to clam that with Unicode, localization is obsolete. If this is not the

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: It's strange that so many UTF8 string functions exist but none that sorts correctly dependend on locale. Sorting can be done not only by locale and alphabetically, but also in phone book and more sort orders. Just in German you have a couple of options to sort

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Jürgen Hestermann
Am 2013-10-18 11:39, schrieb Hans-Peter Diettrich: Sorting can be done not only by locale and alphabetically, but also in phone book and more sort orders. But I don't know any sort order that sorts german umlauts at the end of the whole list (as UTF8CompareText does). Such a sort order is not

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Jürgen Hestermann
Am 2013-10-18 10:43, schrieb Michael Schnell: The OP seems to clam that with Unicode, localization is obsolete. Who claims this? If this is not the case, why then use Unicode ? I thought Unicode is just for international *coding* of characters but not for sort order definition. --

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: Am 2013-10-18 11:39, schrieb Hans-Peter Diettrich: Sorting can be done not only by locale and alphabetically, but also in phone book and more sort orders. But I don't know any sort order that sorts german umlauts at the end of the whole list (as UTF8CompareText

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Jy V
Sorting can be done not only by locale and alphabetically, but also in phone book and more sort orders. But I don't know any sort order that sorts german umlauts at the end of the whole list (as UTF8CompareText does). Such a sort order is not usable for me. You are looking for Collation

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-18 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: Am 2013-10-18 10:43, schrieb Michael Schnell: The OP seems to clam that with Unicode, localization is obsolete. Who claims this? If this is not the case, why then use Unicode ? I thought Unicode is just for international *coding* of characters but not for sort

[Lazarus] UTF8 string compare with correct locale sorting

2013-10-17 Thread Jürgen Hestermann
I fully aggree on this http://www.utf8everywhere.org/ and therefore want to use UTF8 in all my programs. But the problem is sorting UTF8 strings. According to http://forum.lazarus.freepascal.org/index.php?topic=15256.0 UTF8CompareText would be the best choice and it runs quite fast. But it

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-17 Thread Hans-Peter Diettrich
Jürgen Hestermann schrieb: I fully aggree on this http://www.utf8everywhere.org/ and therefore want to use UTF8 in all my programs. But the problem is sorting UTF8 strings. According to http://forum.lazarus.freepascal.org/index.php?topic=15256.0 UTF8CompareText would be the best choice and

Re: [Lazarus] UTF8 string compare with correct locale sorting

2013-10-17 Thread Jürgen Hestermann
Am 2013-10-17 21:56, schrieb Hans-Peter Diettrich: Jürgen Hestermann schrieb: But it does not obey sorting by locale (i.e. german umlauts end up at the end of the list although they need to be sorted together with their corresponding non-umlaut characters (Ü at U, Ä at A, and so on). Does