comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <MrNoSpam@bigpoop.net.au>
Subject: Re: Wide_[Wide_]Character
Date: Tue, 15 Jul 2008 12:37:16 GMT
Date: 2008-07-15T12:37:16+00:00	[thread overview]
Message-ID: <MrNoSpam-252DD5.22371615072008@news-server.bigpond.net.au> (raw)
In-Reply-To: 4878a2c7$0$6560$9b4e6d93@newsspool3.arcor-online.net

Georg Bauhaus wrote:

> 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;

thanks, I hadn't seen that.

> 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.

This seems to be in reference to the Ada C.Interfaces type, not 
Wide_Wide_Character.


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

I'm not sure what the point of Wide_Wide_Character is if not to deal 
with Unicode (or ISO-10646:2003).

You could invent your own 32 bit Character code (or use the one the 
vendor gives you), but playing in your own backyard doesn't seem very 
productive. To me the only point is if it implements the code.


Dale

-- 
dstanbro@spam.o.matic.bigpond.net.au



  reply	other threads:[~2008-07-15 12:37 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       ` Wide_[Wide_]Character Georg Bauhaus
2008-07-15 12:37         ` Dale Stanbrough [this message]
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