comp.lang.ada
 help / color / mirror / Atom feed
From: 402450@cepsz.unizar.es (Jano)
Subject: Ada, Gnat and Unicode
Date: 23 Oct 2003 07:48:12 -0700
Date: 2003-10-23T07:48:12-07:00	[thread overview]
Message-ID: <5d6fdb61.0310230648.62219442@posting.google.com> (raw)

Hello sirs,

I'm thinking about the best procedure to internationalize some Ada
program and I have some doubts. Please shed some light if you can.

AFAIK, the Ada Character type is the 256 first values from ISO 10646
(Latin1). In the same fashion, Wide_Character are the 2**16 values of
that same ISO. The ARM furthermore says that an implementation can
provide alternate representations conforming to local conventions, but
later it states that said representation should be a proper subset of
these two. I'm not very sure about what that implies.

Some old discussion suggest that 10646 and Unicode are equivalent, but
it seems that later they dissociated. In any case Unicode is more than
the 2**16 values that Wide_character can hold so I'm not sure that
Wide_character is useful at all (?)

Anyhow, I was thinking of using UTF8 encoding. That's convenient as it
can hold anything in the Unicode world, is space efficient, provides
good interoperability with other languages/Packages (GtkAda, Java,
...).

My doubt principally comes from behavior when you're not using a
Latin1 OS, for example a Chinese Windows. When you do some I/O, for
example a read from console with Text_IO.Get (Wide_Text_IO?). Or when
using Gnat.Directory_Operations to enumerate files.

I don't find information in the Gnat UG/RM about these things. What
will these functions return? It's specified somewhere, or will they
pass the bytes from the underlying OS calls inside a String so I can't
know in advance what to expect?

Thanks for any clarifications,

Alex.



             reply	other threads:[~2003-10-23 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-23 14:48 Jano [this message]
2003-10-23 15:49 ` Ada, Gnat and Unicode Robert I. Eachus
2003-10-23 17:38   ` Jano
2003-10-23 21:54     ` Robert I. Eachus
2003-10-24 15:09       ` Jano
2003-10-24  4:01 ` Steve
2003-10-24 15:07   ` Jano
replies disabled

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