comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: Avatox 1.1: Trouble with encoding in Windows
Date: Mon, 11 Sep 2006 18:43:39 +0200
Date: 2006-09-11T18:38:47+02:00	[thread overview]
Message-ID: <45059117$0$5144$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <4505696b@news.upm.es>

Manuel Collado wrote:

>> And it might help prevent dodgy arguments like the ones presented
>> by implementers against the clever requirement to write the
>> identifier π in the Ada 2005 library. :-)
> 
> Spanish identifiers like 'tamaño' (size) or 'año' (year) are currently
> accepted by GNAT.

Which makes the argument against π in the library even more bogus
in my book ;-)

> XML markup is meant to be written and read mostly by tools, not by
> humans. So it doesn't matter if a text fragment is coded as 'España' or
> as 'Espa&#xF1;a'. In fact, after parsing, an XML processing agent cannot
> know how it was coded.

Oh, there is nothing stopping an XML processor from keeping track of
input properties, even when the character representation is not an
issue after parsing.
Just like an ASIS tool could (should?) know the character encoding
of the Ada sources it has read.

> it doesn't matter if a text fragment is coded as 'España' or as
> 'Espa&#xF1;a'.

>>    Country: Wide_String := "Espa" & Wide_Character'Val(241) & "a";
...
>>    Town: String := "New" & Character'Val(32) & "York";
>>
> 
> This is outside of scope. I've not spoken about adequate character
> representation in Ada sources, just in XML documents.

Right, this was meant as an analogy: When I have to look at the
text, not process it, I'll be glad if identifiers and literals
are easy to read.

I think there is still a tradeoff between a 7bit external
represenation of ASIS in XML and its usability[1].
For example, when you look at ASIS streams in order to find out
why one of them is broken, XML processors can't do much, because,
their input is broken as a consequence.
Or when I am developing an XSL  transformation for
"refactoring" some of the identifiers in a program,
then I will have to look hard at "tama&#xF1;o" in order
to see that it just is "tamaño". That's not productive in my view.

 [1]  7bit might seem simple bitwise, but it isn't necessarily
easier to process because character entities must be handled, too.

-- Georg



  reply	other threads:[~2006-09-11 16:43 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11  8:24 Avatox 1.0: Trouble with encoding in Windows Manuel Collado
2006-09-11 10:35 ` Georg Bauhaus
2006-09-11 13:49   ` Avatox 1.1: " Manuel Collado
2006-09-11 16:43     ` Georg Bauhaus [this message]
2006-09-11 17:50     ` Björn Persson
2006-09-12  0:06       ` Marc A. Criley
2006-09-12  8:35         ` Manuel Collado
2006-09-13  0:01   ` Avatox 1.0: " Randy Brukardt
2006-09-13  9:01     ` Georg Bauhaus
2006-09-13 19:28       ` Björn Persson
2006-09-14  6:34         ` Georg Bauhaus
2006-09-14 23:09           ` Björn Persson
2006-09-14 22:13         ` Björn Persson
2006-09-16  7:40         ` Martin Krischik
2006-09-16  9:43           ` Björn Persson
2006-09-16  9:59             ` Georg Bauhaus
2006-09-16 11:15               ` Björn Persson
2006-09-17  9:30             ` Martin Krischik
2006-09-13 10:32     ` Manuel Collado
2006-09-13 18:28       ` Björn Persson
2006-09-14  8:11         ` Manuel Collado
2006-09-13 23:05       ` Randy Brukardt
2006-09-13 11:04     ` vgodunko
2006-09-14  8:56       ` Martin Krischik
2006-09-14 21:16         ` Jeffrey R. Carter
2006-09-14 22:55           ` Björn Persson
2006-09-15 23:15             ` Jeffrey R. Carter
2006-09-16  7:38             ` Martin Krischik
2006-09-17 19:41               ` Jeffrey R. Carter
2006-09-15  5:47           ` Martin Krischik
2006-09-15 23:16             ` Jeffrey R. Carter
2006-09-16  7:31               ` Martin Krischik
2006-09-17 19:43                 ` Jeffrey R. Carter
2006-09-15  9:41           ` Georg Bauhaus
2006-09-15 23:28             ` Jeffrey R. Carter
2006-09-16  9:52               ` Georg Bauhaus
2006-09-16 10:31               ` Björn Persson
2006-09-17 19:57                 ` Jeffrey R. Carter
2006-09-18  0:06                   ` Björn Persson
2006-09-18 20:14                     ` Jeffrey R. Carter
2006-09-16  5:10             ` Simon Wright
2006-09-15 18:11           ` Pascal Obry
2006-09-15 18:53             ` Dmitry A. Kazakov
2006-09-15 22:29               ` Georg Bauhaus
2006-09-16  7:46                 ` Dmitry A. Kazakov
2006-09-15 23:35             ` Jeffrey R. Carter
2006-09-15  5:34         ` Simon Wright
2006-09-12  9:52 ` Stephen Leake
2006-09-19  1:16   ` Marc A. Criley
2006-09-19  9:20     ` Stephen Leake
replies disabled

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