comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT vs UTF-8 source file names
Date: Tue, 04 Jul 2017 14:57:03 +0100
Date: 2017-07-04T14:57:03+01:00	[thread overview]
Message-ID: <lyeftw2tlc.fsf@pushface.org> (raw)
In-Reply-To: lyefuia5ur.fsf@pushface.org

Simon Wright <simon@pushface.org> writes:

> PR ada/81114 refers[1].
>
> It turns out that this failure occurs on Windows and macOS. The problem
> is that GNAT smashes the file name to lower case if it knows that the
> file system is case-insensitive (using an ASCII to-lower, so of course
> 'smash' is the right word if there are UTF-8 characters in there).

> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81114

It's worse than that, on macOS anyway[2].

$ GNAT_FILE_NAME_CASE_SENSITIVE=1 gnatmake -c p*.ads
gcc -c páck3.ads
páck3.ads:1:10: warning: file name does not match unit name, should be "páck3.ads"

The reason for this apparently-bizarre message is[3] that macOS takes 
the composed form (lowercase a acute) and converts it under the hood 
to what HFS+ insists on, the fully decomposed form (lowercase a, combining 
acute); thus the names are actually different even though they _look_ 
the same.

I have to say that, great as it would be to have this fixed, the changes 
required would be extensive, and I can’t see that anyone would think it 
worth the trouble.

The recommendation would be "don’t use international characters in the 
names of library units".

[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81114#c1
[3] https://stackoverflow.com/a/6153713/40851


  parent reply	other threads:[~2017-07-04 13:57 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 [this message]
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