comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: UTF-8 Output and "-gnatW8"
Date: Fri, 25 Mar 2016 14:18:59 -0500
Date: 2016-03-25T14:18:59-05:00	[thread overview]
Message-ID: <nd42v3$fkq$1@loke.gir.dk> (raw)
In-Reply-To: 3a65e71c-41ee-49eb-916d-c0be8be9abc6@googlegroups.com

<rieachus@comcast.net> wrote in message 
news:3a65e71c-41ee-49eb-916d-c0be8be9abc6@googlegroups.com...
...
>Second are the character set(s) when an Ada program reads from or writes to 
>files
>or other devices.  The Ada standard defines that binding for Text_IO, 
>Wide_Text_IO,
>etc.  Notice that this is about character sets, not character encodings. 
>You could have
>a Form string "UTF8" for files, with a Wide_Text_IO version that understood 
>it.  Same
>for "Unicode" and so on.  The program would only see ISO-10646 characters, 
>but the
>generated files would be much smaller. ;-)

Or you could use Ada.Strings.Encodings to convert the string to UTF-8 and 
then use Ada.Text_IO to output it. (This is an end-run round strong typing, 
sadly, but it works.)

                                   Randy.

P.S. Robert, nice to hear from you again. It's been a while, hope you're 
doing well.


  reply	other threads:[~2016-03-25 19:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24 17:23 UTF-8 Output and "-gnatW8" Michael Rohan
2016-03-24 22:09 ` Randy Brukardt
2016-03-24 22:34   ` Michael Rohan
2016-03-25 19:15     ` Randy Brukardt
2016-03-25  5:54 ` rieachus
2016-03-25 19:18   ` Randy Brukardt [this message]
2016-03-28 22:48     ` Michael Rohan
2016-03-29  7:44       ` Dmitry A. Kazakov
2016-03-29  8:39       ` G.B.
2016-03-29 22:35       ` Randy Brukardt
2016-04-04 10:52         ` G.B.
2016-04-05  0:39           ` 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