From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,40843b637af826a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.19.194 with SMTP id h2mr7211526wie.0.1354159134514; Wed, 28 Nov 2012 19:18:54 -0800 (PST) MIME-Version: 1.0 Path: ha8ni73613wib.1!nntp.google.com!fu-berlin.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: IBM 437 encoded String to UTF-16 Wide_String Date: Wed, 28 Nov 2012 21:18:23 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <11112110-03b1-4977-ba80-00204926ea23@googlegroups.com> <68663891-14ad-4780-a00d-1cc48ed75323@googlegroups.com> <027679a1-dc5e-4888-9dd1-2a4ccf32e66c@googlegroups.com> <50b5dcd0$0$6581$9b4e6d93@newsspool3.arcor-online.net> <1mefvxxar8vn3$.16pejjtgf8hhg.dlg@40tude.net> <50b5f60e$0$9524$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1354159111 6383 69.95.181.76 (29 Nov 2012 03:18:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 29 Nov 2012 03:18:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response Date: 2012-11-28T21:18:23-06:00 List-Id: "Georg Bauhaus" wrote in message news:50b5f60e$0$9524$9b4e6d93@newsspool1.arcor-online.net... ... > In case of differentiation by sets of code points, I'd rather > have an honest type Unicode_String and---if we are already > fixing the language---put everything that has {Wide_}String > in its name in Annex J. That's rather what I would like to do, especially as trying to support Wide_Wide_String file names makes things into a hash. (Do we really want to have Wide_Wide_Open in Text_IO??). The language already has almost everything needed to support Root_String'Class. Most of the missing capabilities center around getting string literals for such a type. We'd probably need to keep Wide_Wide_String around in order to provide a common interconversion format. > But then, consider > > type Index is range 1 .. 12; > > type R is ('I', 'V', 'X', 'L', 'C', 'D', 'M'); > > type N is array (Index range <>) of R; > > A string of R, named N here, is just fine. In fact, > > Year : constant N := "MCMLXXXIII"; > > has a valid literal, and the year so written is not of any of > the standard string types. The definition of type R actually > implies a codespace, and, for example, Character'('V') or > Wide_Character'('V') have no role in it, irrespective of > any accidental overlap in encoding or representation or > position. > > So, which by force should type N be in Whatever_String'Class? N is not derived from Root_String'Class, and as such it couldn't be used with Put_Line (for one example). If you derived it from that type (possibly using a generic to fill in the operations), then of course you could. In that case, you'd have to provide (or let the generic provide) conversions to and from Unicode. Randy.