From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2afae4a128914036 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: wide_string and assertions Date: Sat, 05 Jun 2004 19:11:43 +0200 Organization: AdaCL Message-ID: <1236309.KZreurQUBi@linux1.krischik.com> References: <47SdnXI-D-3icyLdRVn-uQ@megapath.net> <1224046.crrTJmpIeA@linux1.krischik.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1086455851 07 11795 DCL+GAV6kxf+WPh 040605 17:17:31 X-Complaints-To: usenet-abuse@t-online.de X-ID: VI20osZcQex3VqNEH+iDfsGeJFfF2RSIQ3EZjhSkn-LdvMiYGYR8QI User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:1131 Date: 2004-06-05T19:11:43+02:00 List-Id: 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