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-Thread: 103376,182c0df39337eeca X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!n35g2000prd.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Wide Character Problem in Ada.Numerics Date: 26 Apr 2007 10:43:57 -0700 Organization: http://groups.google.com Message-ID: <1177609437.376996.161050@n35g2000prd.googlegroups.com> References: <1177363740.965003.247270@l77g2000hsb.googlegroups.com> <462daae8$1@news.post.ch> <1177432510.964311.114370@r3g2000prh.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1177609446 5312 127.0.0.1 (26 Apr 2007 17:44:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 26 Apr 2007 17:44:06 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: n35g2000prd.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:15314 Date: 2007-04-26T10:43:57-07:00 List-Id: On Apr 25, 5:27 pm, Brian May wrote: > >>>>> "Jean-Pierre" == Jean-Pierre Rosen writes: > > >> Wait a minute... are you saying that in GNAT, you cannot WITH a > >> package unless the source of the WITH'ed package uses the same > >> encoding as the source of the package doing the WITH'ing? > >> Ouch. This somehow seems to run counter to the whole > >> philosophy of abstraction that packages are supposed to > >> provide. > > How do you expect the compiler to know what encoding is used for each > source file? I think it could only know if the file was compiled > first. Well, the original example had a problem with a language-defined package that was WITH'ed. So surely that file must have been compiled first? By *somebody*??? I hope they're not releasing runtime packages that they've never compiled!!!!!! But in a more general case, the compiler, when it does compile a unit that contains characters not in the 7-bit ASCII range, probably ought to be generating some sort of information indicating what the source encoding was, so that it would know how to reread the source when it's WITH'ed. (And, in particular, whatever file contains that information for Ada.Numerics would be part of the GNAT release.) And in a case where you want to WITH a unit without compiling it first (although I don't really understand why), it should be trivial to provide some mechanism to generate that information without compiling. In any case, this is not a difficult problem to solve. And IMHO a solution is necessary, if the alternative is to require that every source in your environment, including sources delivered as part of the runtime and sources that you might have downloaded from Sourceforge or somewhere else on the web, use the same source encoding. (Actually, that might not even be bad if they all used UTF-8. But requiring that every source use some nonstandard encoding method---well, yuck.) -- Adam