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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 03 Jun 2004 22:37:34 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: Subject: Re: wide_string and assertions Date: Thu, 3 Jun 2004 22:37:50 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: <47SdnXI-D-3icyLdRVn-uQ@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-5VxKX58MukAE2SZ+hirsEJ7gXspRVhb0SFsqJd+Pxgozx5/6ZK5KA7dPi+us/FlELfWFZpYQBFk4ZTH!cnZaluTYyvYS6Zls0TfAb5uc8oS1p5Qe/sonbLjs8ra++q4jyi7X33D8SG81pL9+E42sJ9RWxQKZ X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1084 Date: 2004-06-03T22:37:50-05:00 List-Id: "Georg Bauhaus" wrote in message news:c9nj9l$cif$1@a1-hrz.uni-duisburg.de... > AI-00286 present pragma assert with two arguments, one > of them a string. (Likewise, exceptions can be raised > "with a string"). I have some messages I want use as > the second argument. They contain characters outside > Latin-1. (And another 8bit character set won't do.) > > In an assert(x, y), y has to be static. So I guess for y I > will have to play tricks and use UTF-8 coding of static > String values? Yes. > Has using Wide_String variants ever been considered? Or > is there just "no demand"? Ada.Exceptions only supports String for exception messages. Assert just uses that existing mechanism for handling messages. As far as demand goes, you're the first person to mention it to my knowledge -- which is suggests that the demand is low. :-) I'd like to see better support for UTF-8, but I don't think anything sensible would really work in Assert (because the argument is static). Of course, a function would work when raising with a message: raise Assert_Error with To_UTF_8 ("Wide_Wide_String"); so that might be preferable for this purpose. (But you'll probably have to write the function yourself; there doesn't seem to be much support for including such functions in the Standard.) Randy.