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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT vs UTF-8 source file names Date: Fri, 7 Jul 2017 14:40:18 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Fri, 7 Jul 2017 19:40:19 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="5347"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:47320 Date: 2017-07-07T14:40:18-05:00 List-Id: "Simon Wright" wrote in message news:lybmow1pfk.fsf@pushface.org... ... > The rest is about GNAT's behaviour; to reiterate, ARM 2.1(16/3) says > > "An Ada implementation shall accept Ada source code in UTF-8 > encoding, with or without a BOM (see A.4.11), where every character > is represented by its code point." > > which for GNAT is not met unless either there is a BOM or -gnatW8 is > used. The Standard says "shall accept"; it has nothing to say about what handstands are needed to get the required behavior. If GNAT required to chant "Ada is Great" toward New York and then Paris before accepting UTF-8 source, it would still meet the requirement of the Standard. Certainly requiring the use of -gnatW8 to get the language required behavior is acceptable (recall that you have to use -gnatE and used to have to use -gnato to get the language required behavior in other areas). > On the other hand, ARM 2.1(4/3) says "The coded representation for > characters is implementation defined", which seems to conflict with (16) > - but then, the AARM ramification (4.b/2) notes that the rule doesn't > have much force! An implementation can have other encodings (which are implementation-defined). The new rule (2.1(16/3)) mainly just reflects that practically, an Ada compiler has to be able to accept the source of the ACATS; we decided to require that in the Standard that so that there is a standard source form that every compiler is going to support. Thus it is now possible to portably write Ada source code as well as write a portable Ada program. (Practically, this was always true, but it's better to have it written in the Standard.) Randy.