comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: IBM 437 encoded String to UTF-16 Wide_String
Date: Wed, 28 Nov 2012 09:52:33 +0100
Date: 2012-11-28T09:52:33+01:00	[thread overview]
Message-ID: <mv2j5fu41fb6.rc23cjp3s2bs$.dlg@40tude.net> (raw)
In-Reply-To: 027679a1-dc5e-4888-9dd1-2a4ccf32e66c@googlegroups.com

On Wed, 28 Nov 2012 00:34:53 -0800 (PST), briot.emmanuel@gmail.com wrote:

> I think the most convenient here would be to create a small binding to the
> iconv library. I believe it exists on most systems, although with slightly
> different interfaces. And it supports a huge number of encodings.

No. IMO the most convenient way would be to fix the language in order to
have Wide_Wide_String'Class of which String, Wide_String, Wide_Wide_String,
UTF8_String etc were members.

Encoding is nothing but an instance of Wide_Wide_String'Class implementing
the interface of an array of code units. In the case of IBM 437 it is
something like:

   type IBM_437_String is
      new Wide_Wide_String  -- Logical view, string of code points
      and array (Positive range <>) of Byte; -- Presentation view

Conversions if ever needed, would be type/view conversions.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-11-28  8:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 21:02 IBM 437 encoded String to UTF-16 Wide_String gautier_niouzes
2012-11-27 21:38 ` J-P. Rosen
2012-11-27 22:12 ` gautier_niouzes
2012-11-27 22:14 ` Dmitry A. Kazakov
2012-11-27 23:13   ` gautier_niouzes
2012-11-27 23:41 ` Vadim Godunko
2012-11-28  8:34   ` briot.emmanuel
2012-11-28  8:52     ` Dmitry A. Kazakov [this message]
2012-11-28  9:43       ` Georg Bauhaus
2012-11-28  9:58         ` Dmitry A. Kazakov
2012-11-28 11:31           ` Georg Bauhaus
2012-11-28 13:36             ` Dmitry A. Kazakov
2012-11-28 13:47               ` Georg Bauhaus
2012-11-28 14:23                 ` Dmitry A. Kazakov
2012-11-28 17:35                   ` Georg Bauhaus
2012-11-28 18:00                     ` Dmitry A. Kazakov
2012-11-29  9:51                       ` Georg Bauhaus
2012-11-29 10:52                         ` Dmitry A. Kazakov
2012-11-29 14:05                           ` Georg Bauhaus
2012-11-29 21:03                             ` Dmitry A. Kazakov
2012-11-29  3:18             ` Randy Brukardt
2012-11-28 13:51     ` gautier_niouzes
replies disabled

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