comp.lang.ada
 help / color / mirror / Atom feed
* Ada, Gnat and Unicode
@ 2003-10-23 14:48 Jano
  2003-10-23 15:49 ` Robert I. Eachus
  2003-10-24  4:01 ` Steve
  0 siblings, 2 replies; 7+ messages in thread
From: Jano @ 2003-10-23 14:48 UTC (permalink / 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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-24 15:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23 14:48 Ada, Gnat and Unicode Jano
2003-10-23 15:49 ` 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

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