comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: The extension of Is_Basic to unicode (about AI12-0260-1)
Date: Wed, 11 Apr 2018 05:38:06 +0200
Date: 2018-04-11T05:38:06+02:00	[thread overview]
Message-ID: <pajvut$16bj$1@gioia.aioe.org> (raw)
In-Reply-To: 7d5b8717-1e70-4153-af13-dfab24679ed9@googlegroups.com

Le 11/04/2018 à 02:52, ytomino a écrit :
> AI12-0260-1/04 Functions Is_Basic and To_Basic in Wide_Characters.Handling
> I found inconsistency between existing Characters.Handling.Is_Basic and new Wide_Characters.Handling.Is_Basic.
> 
> Characters.Handling.Is_Basic in RM:
> 
>    True if Item is a basic letter. A basic letter is a character that is in one of the ranges 'A'..'Z' and 'a'..'z', or that is one of the following: 'Æ', 'æ', 'Ð', 'ð', 'Þ', 'þ', or 'ß'.
> 
> Characters.H.Is_Basic includes only alphabet, not include other symbols.
> Is_Basic ('+') = False.
> 
> Wide_Characters.Handling.Is_Basic in AI:
> 
>   Returns True if the Wide_Character designated by Item has no Decomposition Mapping in the code charts of ISO/IEC 10646:2017; otherwise returns False. 
>   
> Wide_Characters.H.Is_Basic includes all un-decomposable characters, called as "base character" in Unicode world. It include the symbols.
> Is_Basic ('+') = True.
> 
> Perhaps, Is_Basic must be defined as the intersection of the set of base characters *and the set of letters* (categorized as 'Ll', 'Lu', 'Lt', 'Lm', 'Lo'... in Unicode Character Database).


Right, but the old definition was wrong and the new one is right. In
general, Ada prefers to use existing standards rather than inventing its
own special definitions. If you need to make sure that something is a
letter, there is the Is_Letter function.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


  reply	other threads:[~2018-04-11  3:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  0:52 The extension of Is_Basic to unicode (about AI12-0260-1) ytomino
2018-04-11  3:38 ` J-P. Rosen [this message]
2018-04-11  3:52   ` ytomino
2018-04-11 14:32 ` Dan'l Miller
2018-04-11 20:54   ` J-P. Rosen
2018-04-11 22:20     ` Randy Brukardt
2018-04-11 23:57       ` ytomino
2018-04-12  5:14         ` J-P. Rosen
replies disabled

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