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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,182c0df39337eeca X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!195.96.0.7.MISMATCH!newsfeed.utanet.at!newsfeed01.chello.at!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Wide Character Problem in Ada.Numerics From: Georg Bauhaus In-Reply-To: <462daae8$1@news.post.ch> References: <1177363740.965003.247270@l77g2000hsb.googlegroups.com> <462daae8$1@news.post.ch> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-Id: <1177406164.6354.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Date: Tue, 24 Apr 2007 11:16:05 +0200 NNTP-Posting-Date: 24 Apr 2007 11:10:38 CEST NNTP-Posting-Host: f4b40357.newsspool4.arcor-online.net X-Trace: DXC=@G8flOK2P_Q[7Non7UCi8U4IUK On Tue, 2007-04-24 at 08:59 +0200, Martin Krischik wrote: > david.smith@gmail.com schrieb: > > When I next compile my real code with greek letters *and* using the > > Ada.Numerics package, I get the following error: > > > > a-numeri.ads:25:04: illegal wide character > > > > This is the line that has the bracket notation definition of pi in > > it. > > > > Does anyone know what is going on? Why is there an error in a system > > file? > > Yes - I saw that to - GNAT produces this error if utf-8 (-gnatW8) is > used for source code. Best is to file a bug report. Wouldn't it be best in this case to do what everyone else does and, as an option, have the compiler determine the default character encoding using a BOM? http://unicode.org/faq/utf_bom.html#22 Bytes Encoding Form 00 00 FE FF UTF-32, big-endian FF FE 00 00 UTF-32, little-endian FE FF UTF-16, big-endian FF FE UTF-16, little-endian EF BB BF UTF-8 If there is no BOM, there is ambiguity anyway for compilers with circuits for interpreting 8 bits in many ways.