comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: strange behaviour of utf-8 files
Date: Thu, 21 Nov 2013 19:03:29 -0600
Date: 2013-11-21T19:03:29-06:00	[thread overview]
Message-ID: <l6mah4$3c1$1@loke.gir.dk> (raw)
In-Reply-To: 7464679c-6b98-4e23-a337-83b671473553@googlegroups.com

"Stoik" <staszek.goldstein@gmail.com> wrote in message 
news:7464679c-6b98-4e23-a337-83b671473553@googlegroups.com...
> Thanks for your comments. It is obviously a question of having a different 
> encoding in the
> editor and the compiler. I forgot to add the -gnatW8 switch to the 
> compiler (this should be
> a default, I believe).

Ada 2012 requires compilers to accept UTF-8 source code. But given that Ada 
source code historically is Latin-1, it's very unlikely that compilers would 
change the default setting. The effect would be to break the compilation of 
much existing source, a step that most compiler vendors would never take.

Speaking as a vendor, Janus/Ada has a number of default switches that would 
never be the default choices today. But changing the defaults breaks 
*everyone's* build scripts; it's just so disruptive that it's not something 
that we would do unless there was no other choice. It makes command line use 
of compilers with an extensive history harder than we would like, but that's 
the price of having customers that go way back.

If UTF-8 files were somehow identified as such, we could have friendlier 
defaults -- but since the use of the BOM is optional (and discouraged in 
recent Unicode standards), and there are no encoding attributes in common 
file systems (Windows, Linux) -- there really isn't much that we can do. 
This is going to remain a mess for a long time to come, I fear.

                                          Randy.

P.S. Truth-in-advertising: Janus/Ada *only* takes Latin-1 input; it has no 
support for any other encoding (of course it supports Wide_String at 
runtime). That will have to change as we migrate to Ada 2012, but it 
probably will be a while before that happens (not a lot of demand).





  reply	other threads:[~2013-11-22  1:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16 13:12 strange behaviour of utf-8 files Stoik
2013-11-16 13:34 ` Dmitry A. Kazakov
2013-11-16 15:09   ` Stoik
2013-11-16 15:55     ` Dmitry A. Kazakov
2013-11-17 13:32       ` Georg Bauhaus
2013-11-17 14:07         ` Dmitry A. Kazakov
2013-11-17 17:19           ` Dennis Lee Bieber
2013-11-17 18:07             ` Dmitry A. Kazakov
2013-11-17 19:05           ` Georg Bauhaus
2013-11-17 20:38             ` Dmitry A. Kazakov
2013-11-18  8:38               ` Georg Bauhaus
2013-11-18  9:01                 ` Dmitry A. Kazakov
2013-11-18 10:06                   ` Georg Bauhaus
2013-11-18  8:44               ` Georg Bauhaus
2013-11-18 10:24                 ` Dmitry A. Kazakov
2013-11-18 13:05                   ` G.B.
2013-11-18 15:25                     ` Dmitry A. Kazakov
2013-11-18 15:51                       ` G.B.
2013-11-18 17:34                         ` Dmitry A. Kazakov
2013-11-18  0:34           ` Stoik
2013-11-16 17:01     ` Georg Bauhaus
2013-11-17 10:38       ` Stoik
2013-11-16 15:12   ` Stoik
2013-11-16 15:57     ` Dmitry A. Kazakov
2013-11-17 11:12       ` Stoik
2013-11-22  1:03         ` Randy Brukardt [this message]
2013-11-22  3:02           ` Shark8
2013-11-22 11:54             ` Georg Bauhaus
2013-11-23  4:14             ` Randy Brukardt
2013-12-06  2:17               ` Georg Bauhaus
2013-11-16 20:06     ` Peter C. Chapin
2013-11-17 10:34       ` Stoik
2013-11-22  0:53       ` Randy Brukardt
replies disabled

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