comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: String type conversions
Date: 1999/02/09
Date: 1999-02-09T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.99Feb9173118@spectre.mitre.org> (raw)
In-Reply-To: 36C08E00.C3904670@Botton.com

In article <36C08E00.C3904670@Botton.com> David Botton <David@Botton.com> writes:

  > What is the best way to convert back forth between:

  > Wide_String to/from String

   Is this a trick question?  To convert from String to Wide_String is
easy, call Ada.Characters.Handling.To_Wide_String. ;-)  To go in the
other direction, there is a To_String function.  But what you may
really need is something with a better mapping for Wide_Characters not
in Character.  Note that you may want to make sure your Character type
is Latin-1 and not some other character set if you are using upper page
characters.

  > wchar_array to/from char_array

   Do I send you to the C newsgroup?  Or just tell you that there is
no Ada defined mapping from one to the other, and the actual mapping
will be OS and compiler specific.

   It is a shame that the character mapping arena is such a mess.
That is not an Ada issue, quite the opposite, in Ada it is a lot less
messy than in some other languages.  It is just that there are so many
standard, pseudo-standard, and non-standard character sets out there.


--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1999-02-09  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-09  0:00 String type conversions David Botton
1999-02-09  0:00 ` Tucker Taft
1999-02-09  0:00 ` Stephen Leake
1999-02-09  0:00 ` Robert I. Eachus [this message]
1999-02-12  0:00   ` Nick Roberts
replies disabled

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