From: Georg Bauhaus on
On 6/25/10 4:08 AM, deadlyhead wrote:
> I've been messing around a bit with files of various encodings, and
> just recently I've become aware of the Form parameter to Open and
> Create and the -gnatW switch for handling character encoding.

(Sometimes I think that Ada designers should, as part of their
"engineering awareness", work in a "web shop" for a few
months. The experience of working with real encoded data
might make them look again at character encoding, but less,
uhm, condescendingly. Character encoding (or string
encoding) is a representation issue and should be treated at
this level. ISO 10646 deals with UTF. A character is
ubiquitously a fundamental piece of data.

In my dream, then, there is enough motivation to make
character encoding a solid part of the language proper
and thus have Ada be the first language that makes character
representation well defined and easy to use!)

> I'm okay with giving up on this method and using the XML/Ada Unicode
> libraries for the text translation. It'd be nice if I didn't have to,
> though.

Does GNAT 2010 support the Ada 2012 strings encoding package?

http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0137-1.txt?rev=1.5&raw=Y

Another alternative might be EAstrings (encoding aware strings).
It has an IO child package. It's part of AdaCL at
http://adacl.sourceforge.net/
From: deadlyhead on
On Jun 25, 12:03 am, Georg Bauhaus <rm-
host.bauh...(a)maps.futureapps.de> wrote:
> On 6/25/10 4:08 AM, deadlyhead wrote:
>
> > I've been messing around a bit with files of various encodings, and
> > just recently I've become aware of the Form parameter to Open and
> > Create and the -gnatW switch for handling character encoding.
>
> (Sometimes I think that Ada designers should, as part of their
> "engineering awareness", work in a "web shop" for a few
> months.  The experience of working with real encoded data
> might make them look again at character encoding, but less,
> uhm, condescendingly.  Character encoding (or string
> encoding) is a representation issue and should be treated at
> this level.  ISO 10646 deals with UTF.  A character is
> ubiquitously a fundamental piece of data.
>
> In my dream, then, there is enough motivation to make
> character encoding a solid part of the language proper
> and thus have Ada be the first language that makes character
> representation well defined and easy to use!)
>
> > I'm okay with giving up on this method and using the XML/Ada Unicode
> > libraries for the text translation.  It'd be nice if I didn't have to,
> > though.
>
> Does GNAT 2010 support the Ada 2012 strings encoding package?
>
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0137-1.txt?rev=....
>
> Another alternative might be EAstrings (encoding aware strings).
> It has an IO child package. It's part of AdaCL athttp://adacl.sourceforge..net/

I've searched around Adacore's site, googling ath manually, but
haven't found any references to their supporting Strings.Encodings in
GNAT 2010. Still, it's very encouraging that ARG has proposed making
encodings a standard part of the language. I don't know of any other
languages that make character encoding part of the standard, though
I'm pretty ignorant when it comes to the vast majority of languages
out there.

Also, I keep forgetting about AdaCL. I've been meaning to try it out
for a long time. Perhaps this is just the right place to start.

-- deadlyhead