comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: strange behaviour of utf-8 files
Date: Thu, 21 Nov 2013 18:53:32 -0600
Date: 2013-11-21T18:53:32-06:00	[thread overview]
Message-ID: <l6m9uc$f9e$1@loke.gir.dk> (raw)
In-Reply-To: alpine.DEB.2.02.1311161503000.6074@whirlwind

"Peter C. Chapin" <PChapin@vtc.vsc.edu> wrote in message 
news:alpine.DEB.2.02.1311161503000.6074@whirlwind...
> On Sat, 16 Nov 2013, Stoik wrote:
>
>> By the way, nothing changes if I use wide_character and wide_string 
>> instead of character and string. Even if character=octet, certainly 
>> wide_character is not an octet!
>
> It sounds like you want something like
>
>     function UTF8_String_To_Wide_String(S : String) return Wide_String;
>
> UTF-8 is a variable length encoding and thus not the same beast as 
> Wide_String. String literals are going to be encoded in the same manner as 
> the rest of the source text, of course.

Ada 2012 has Ada.Strings.UTF_Encodings for run-time encoding conversions. 
(See A.4.11.) We might be able to do better in the next version of Ada 
(whenever that is), but I wouldn't hold my breath.

                                Randy.


      parent reply	other threads:[~2013-11-22  0:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16 13:12 strange behaviour of utf-8 files Stoik
2013-11-16 13:34 ` Dmitry A. Kazakov
2013-11-16 15:09   ` Stoik
2013-11-16 15:55     ` Dmitry A. Kazakov
2013-11-17 13:32       ` Georg Bauhaus
2013-11-17 14:07         ` Dmitry A. Kazakov
2013-11-17 17:19           ` Dennis Lee Bieber
2013-11-17 18:07             ` Dmitry A. Kazakov
2013-11-17 19:05           ` Georg Bauhaus
2013-11-17 20:38             ` Dmitry A. Kazakov
2013-11-18  8:38               ` Georg Bauhaus
2013-11-18  9:01                 ` Dmitry A. Kazakov
2013-11-18 10:06                   ` Georg Bauhaus
2013-11-18  8:44               ` Georg Bauhaus
2013-11-18 10:24                 ` Dmitry A. Kazakov
2013-11-18 13:05                   ` G.B.
2013-11-18 15:25                     ` Dmitry A. Kazakov
2013-11-18 15:51                       ` G.B.
2013-11-18 17:34                         ` Dmitry A. Kazakov
2013-11-18  0:34           ` Stoik
2013-11-16 17:01     ` Georg Bauhaus
2013-11-17 10:38       ` Stoik
2013-11-16 15:12   ` Stoik
2013-11-16 15:57     ` Dmitry A. Kazakov
2013-11-17 11:12       ` Stoik
2013-11-22  1:03         ` Randy Brukardt
2013-11-22  3:02           ` Shark8
2013-11-22 11:54             ` Georg Bauhaus
2013-11-23  4:14             ` Randy Brukardt
2013-12-06  2:17               ` Georg Bauhaus
2013-11-16 20:06     ` Peter C. Chapin
2013-11-17 10:34       ` Stoik
2013-11-22  0:53       ` Randy Brukardt [this message]
replies disabled

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