comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: wide_string and assertions
Date: Sat, 05 Jun 2004 19:11:43 +0200
Date: 2004-06-05T19:11:43+02:00	[thread overview]
Message-ID: <1236309.KZreurQUBi@linux1.krischik.com> (raw)
In-Reply-To: c9sbah$abt$1@a1-hrz.uni-duisburg.de

Georg Bauhaus wrote:

> :   function To_UTF8 (
> :      Str : in Wide_String)
> :   return
> :      String;
> 
> Is this available yet?

If you know how to use cvs: Yes. Development is currently archived in AdaCL.

> (I guess it will extend Wide_Character values 
> into XML/Ada's mod 2**32 Unicode_Char and then pass the result through
> the substitution chain?)

I principle yes. But I shortcut for performance - that is I don't use an
UTF32_String in the middle.

> :>    function to_UTF8_String
> :>      (s: Wide_String; substitute: Character := '#') return String is
> : 
> : No substitution. An exception is raised if it does not fit. If this is a
> : proble you might be better of raising a Utf32_String.
> 
> It is a problem as the UTF-8 strings are used in exception messages.
> Raising an exception in To_UTF8 when raising another exception via
> 
>   Raise_Exception (excpt'Identity, To_UTF8 (msg));
> 
> does not seem helpful here?

The To_Utf8 will not raise an exception - only the From_UTF8. So no problem
here.
 
With Regards

Martin.

-- 
mailto://krischik@users.sourceforge.net
http://www.ada.krischik.com




  reply	other threads:[~2004-06-05 17:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03 16:23 wide_string and assertions Georg Bauhaus
2004-06-04  3:37 ` Randy Brukardt
2004-06-04  8:49   ` Martin Krischik
2004-06-05  8:42     ` Pascal Obry
2004-06-05 17:15       ` Martin Krischik
2004-06-04 17:48   ` Georg Bauhaus
2004-06-05  7:10     ` Martin Krischik
2004-06-05 11:37       ` Georg Bauhaus
2004-06-05 17:11         ` Martin Krischik [this message]
2004-06-05 18:41         ` Björn Persson
2004-06-08 16:41           ` Georg Bauhaus
2004-06-09 13:19             ` Björn Persson
2004-06-09 15:03               ` Georg Bauhaus
2004-06-09 15:26                 ` Björn Persson
2004-06-10 12:25                   ` Georg Bauhaus
2004-06-10 13:30                     ` Björn Persson
2004-06-05 12:32     ` China Björn Persson
2004-06-05 16:49       ` China, character sets Georg Bauhaus
2004-06-05 21:50       ` China Alexander E. Kopilovich
2004-06-04 20:42   ` wide_string and assertions Nick Roberts
2004-06-06 13:23   ` Björn Persson
replies disabled

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