comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: GNAT vs UTF-8 source file names
Date: Fri, 7 Jul 2017 14:40:18 -0500
Date: 2017-07-07T14:40:18-05:00	[thread overview]
Message-ID: <ojoo32$573$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: lybmow1pfk.fsf@pushface.org

"Simon Wright" <simon@pushface.org> 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.



  parent reply	other threads:[~2017-07-07 19:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 17:10 GNAT vs UTF-8 source file names Simon Wright
2017-06-17 17:20 ` Simon Wright
2017-06-27 13:22   ` Jacob Sparre Andersen
2017-06-27 21:45     ` Niklas Holsti
2017-06-28  5:05       ` G.B.
2017-07-04 13:57   ` Simon Wright
2017-07-04 17:30     ` Shark8
2017-07-04 18:08       ` Dennis Lee Bieber
2017-07-05  5:25       ` J-P. Rosen
2017-07-06 15:18         ` Shark8
2017-07-07  8:19           ` J-P. Rosen
2017-07-05  5:21     ` J-P. Rosen
2017-07-05  9:47       ` Simon Wright
2017-07-05 11:20         ` J-P. Rosen
2017-07-05 18:42           ` Randy Brukardt
2017-07-06 18:43           ` Simon Wright
2017-07-07  8:26             ` J-P. Rosen
2017-07-07 11:01               ` Simon Wright
2017-07-07 11:49                 ` Jacob Sparre Andersen
2017-07-07 19:44                   ` Randy Brukardt
2017-07-07 19:40                 ` Randy Brukardt [this message]
2017-07-07 21:02                   ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox