comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: Supporting full Unicode
Date: 12 May 2004 07:44:56 GMT
Date: 2004-05-12T07:44:56+00:00	[thread overview]
Message-ID: <2004512-94456-948110@foorum.com> (raw)
In-Reply-To: 9j8oc.16324$V97.13312@newsread1.news.pas.earthlink.net


Brian Catlin asked:
> The complete definition of Unicode allows for 2-,3-, and 4-byte
> characters. How is this supported in Ada95 and Ada0y?

I am not aware of any differences between Ada 95 and Ada 2005 in that
respect.  Ada 95 has a type Wide_Character, "whose values correspond
to the 65536 code positions of the ISO 10646 Basic Multilingual Plane
(BMP)." (RM 3.5.2(3)).  So, Ada 95 supports the UCS-2 encoding
natively.  The other standard type, Character, is defined as Latin-1.

As you can see, there is no standard support for 3- and 4-byte
characters; you would have to support them in a nonstandard way, e.g.

type Wide_Wide_Character is mod 2**32; -- UCS-4
type Wide_Wide_String is array (Natural range <>) of Wide_Wide_Character;

But I would favour using UTF-8 as the internal encoding anyway.  It is
easy to define a UTF8_String type similar to the above.  GtkAda has
such a type, as GTK+ uses UTF-8 as both internal and external
encoding.

-- 
Ludovic Brenta.


-- 
Use our news server 'news.foorum.com' from anywhere.
More details at: http://nnrpinfo.go.foorum.com/



  reply	other threads:[~2004-05-12  7:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 17:45 Supporting full Unicode Brian Catlin
2004-05-12  7:44 ` Ludovic Brenta [this message]
2004-05-12  8:23   ` Marius Amado Alves
2004-05-12 10:43     ` Martin Krischik
2004-05-12 14:56       ` Björn Persson
2004-05-12 19:09       ` David Starner
2004-05-12 19:25     ` David Starner
2004-05-12  9:41   ` David Starner
2004-05-12 10:16     ` Björn Persson
2004-05-12 10:57       ` Ludovic Brenta
2004-05-12 14:53         ` Björn Persson
2004-05-12 18:55           ` David Starner
2004-05-12  9:30 ` Martin Krischik
2004-05-13  1:15 ` Randy Brukardt
2004-05-13 17:58   ` Brian Catlin
2004-05-13 19:42     ` Randy Brukardt
2004-05-14  8:40       ` Andersen Jacob Sparre
2004-05-14 20:20         ` Randy Brukardt
2004-05-14  4:00 ` Vadim Godunko
2004-05-14 17:51   ` Brian Catlin
  -- strict thread matches above, loose matches on Subject: below --
2004-05-12 12:40 amado.alves
2004-05-12 14:34 ` Martin Krischik
2004-05-12 18:24   ` David Starner
2004-05-12 20:04   ` Florian Weimer
2004-05-12 14:12 amado.alves
replies disabled

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