comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: GNAT vs UTF-8 source file names
Date: Sun, 30 Apr 2017 18:10:42 +0100
Date: 2017-04-30T18:10:42+01:00	[thread overview]
Message-ID: <lytw55kei5.fsf@pushface.org> (raw)

ACATS 4.1 test C250002 involves unit names with UTF-8 characters (the
source has the correct UTF-8 BOM, the relevant unit is named C250002_Z
where Z is actually UTF-8 C381, latin capital letter a with acute;
gnatchop correctly generates a source file with the BOM and name
c250002_z where z is actually UTF-8 C3A1, latin small letter a with
acute).

On compiling, the compiler (GNAT GPL 2016, FSF GCC 7.0.1) fails to find
the file; it says e.g.

   GNATMAKE GPL 2016 (20160515-49)
   Copyright (C) 1992-2016, Free Software Foundation, Inc.
   gcc -c -I../../../support -gnatW8 c250002.adb
   gcc -c -I../../../support -gnatW8 c250002_0.ads
   End of compilation
   gnatmake: "c250002_?.adb" not found

I _suspect_ that the problem is down to the .ali file. macOS says

   $ file -I *
   c250002.adb:   text/plain; charset=utf-8
   c250002.ali:   text/plain; charset=unknown-8bit
   c250002.lst:   text/plain; charset=us-ascii
   c250002.o:     application/x-mach-binary; charset=binary
   c250002_0.ads: text/plain; charset=utf-8
   c250002_á.adb: text/plain; charset=utf-8
   c250002_á.ads: text/plain; charset=utf-8

(the last 2 were actually a-acute on the terminal) but the .ali file is
confused about whether the representation of the a-acute is C3A1 (good,
assuming it gets interpreted as UTF-8 without a BOM) or E3A1 (bad),
particularly about the corresponding .ali file name.

Any thoughts? is this a known issue?

(C250001, which has BOMs and UTF-8 identifiers but not file names, works fine
with no -gnatW8 messing)


             reply	other threads:[~2017-04-30 17:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 17:10 Simon Wright [this message]
2017-06-17 17:20 ` GNAT vs UTF-8 source file names 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
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