In message <5d39…@sick-of-spam.invalid>
on 17 Nov 2026 Bob Latham wrote:
> In article <5d38…@sprie.nl>,
> Paul Sprangers <Pa…@sprie.nl> wrote:
>> A string is 'bigger' than another if it alphabetically comes after
>> the other one. "Sebastian Barthel" is bigger than "Sebestian Bach"!
>> The point is that BASIC only looks at the ASCII value of characters
>> for determining the alphabetical flow. Therefore it puts 'Céline'
>> after 'Coline', for example.
> For my 'Céline' fix i noticed that the possible problem characters
> are for the most part form &C0 upwards and so I simply have a
> substitution table for those chars which is only used in the
> comparison section, I don't actually change the characters.
You might like to consider the SWI Territory_Collate which has options to
ignore both case and accents. I see from RISC OS 5.22 onwards it can even
interpret numbers in the string and sort them more naturally.
It will probably slow things down a little as a SWI will always be slower
than an optimised routine in assembly language.
--
Matthew Phillips
Durham