comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Unicode string comparision functions
Date: Thu, 12 Nov 2015 13:46:20 -0600
Date: 2015-11-12T13:46:20-06:00	[thread overview]
Message-ID: <n22qac$6np$1@loke.gir.dk> (raw)
In-Reply-To: 00aab01c-7d18-408a-9a4c-feb80ac9a1e1@googlegroups.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1409 bytes --]

"Shark8" <onewingedshark@gmail.com> wrote in message 
news:00aab01c-7d18-408a-9a4c-feb80ac9a1e1@googlegroups.com...
>I thought I had come across a unicode Equals_Case_Insensitive
>(and less than) for unicode using Wide_Wide_Strings some time
>ago, but I cannot seem to find them again; am I misremembering,
>or were they in a really odd place?

Not an odd place, but they have their own subclause (A.4.10).

>For this particular application I would rather use Wide_Wide_String than
> Wide_String so I wouldn't have to worry about invalid character 
> [sequences]
> for the non-ASCII characters. (And, while UTF-8 encoded strings have the
> nice property of being endian agnostic, they still have that property.) --  
> But I
> suppose the main thing is to have a good case insensitive compare such 
> that
> PRUSSIAN and Prußian are considered equal.

Sorry, the language-defined equality won't do that. It uses 
"locale-independent simple case folding", which means that strings of 
different lengths are always different. (That's the same case comparison 
that's used for Ada identifiers.)

The much more complex "locale-independent full case folding" is not provided 
by the language, we didn't want to inflict that level of pain on Ada 
implementers (especially as the need was unclear).

The AARM note A.4.10(3.a/3) gives a bit of background.

                                       Randy.



Thanks. 



  parent reply	other threads:[~2015-11-12 19:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  4:06 Unicode string comparision functions Shark8
2015-11-12  5:04 ` Jeffrey R. Carter
2015-11-12 20:01   ` Shark8
2015-11-12 22:33     ` Jeffrey R. Carter
2015-11-13  0:10       ` Randy Brukardt
2015-11-13  8:22         ` Simon Wright
2015-11-12 19:46 ` Randy Brukardt [this message]
2015-11-12 20:07   ` Shark8
2015-11-12 21:35     ` Randy Brukardt
2015-11-13  6:03 ` Vadim Godunko
2015-11-13 17:43   ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox