comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <see.reply.to@maps.futureapps.de>
Subject: Re: Wide_[Wide_]Character
Date: Sat, 12 Jul 2008 14:25:43 +0200
Date: 2008-07-12T14:25:43+02:00	[thread overview]
Message-ID: <4878a2c7$0$6560$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <4878950d$0$25515$4d3efbfe@news.sover.net>

Peter C. Chapin wrote:

> I understand that this doesn't speak to the issue of encoding, but
> perhaps that is intended to be left unspecified. In any event it seems
> fairly clear that you should be able to store any of 2147483648 values
> in a single Wide_Wide_Character variable. Doesn't that mean
> Wide_Wide_Character needs to be (at least) 32 bits?

package Standard specifize 'Size of Wide_Wide_Character,

        type Wide_Wide_Character is
            (nul, soh ... Hex_7FFFFFFE, Hex_7FFFFFFF);
        for Wide_Wide_Character'Size use 32;


Annex B has some hints as to the internal representation:

43.a/2 Discussion: The C types wchar_t and char16_t seem to be the same.
   However, wchar_t has an implementation-defined size, whereas
   char16_t is guaranteed to be an unsigned type of at least 16 bits.
   Also, char16_t and char32_t are encouraged to have UTF-16 and UTF-32
   representations; that means that they are not directly the same as
   the Ada types, which most likely don't use any UTF encoding.

Isn't this just like the RM not specifying the bit layout of
numeric objects?


-- 
Georg Bauhaus
Y A Time Drain  http://www.9toX.de



  reply	other threads:[~2008-07-12 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-12  7:44 Wide_[Wide_]Character Dale Stanbrough
2008-07-12  8:11 ` Wide_[Wide_]Character Dmitry A. Kazakov
2008-07-12 11:00   ` Wide_[Wide_]Character Dale Stanbrough
2008-07-12 11:27     ` Wide_[Wide_]Character Peter C. Chapin
2008-07-12 12:25       ` Georg Bauhaus [this message]
2008-07-15 12:37         ` Wide_[Wide_]Character Dale Stanbrough
2008-07-15 14:06           ` Wide_[Wide_]Character Georg Bauhaus
2008-07-12 20:56     ` Wide_[Wide_]Character Dmitry A. Kazakov
2008-07-12 10:11 ` Wide_[Wide_]Character anon
2008-07-12 10:58   ` Wide_[Wide_]Character Dale Stanbrough
2008-07-13  1:38     ` Wide_[Wide_]Character anon
2008-07-22 19:18 ` Wide_[Wide_]Character Adam Beneschan
replies disabled

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