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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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 h2mr6376389wie.0.1354096756977; Wed, 28 Nov 2012 01:59:16 -0800 (PST) Path: q13ni62330wii.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: IBM 437 encoded String to UTF-16 Wide_String Date: Wed, 28 Nov 2012 10:58:59 +0100 Organization: cbb software GmbH Message-ID: <1mefvxxar8vn3$.16pejjtgf8hhg.dlg@40tude.net> 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-11-28T10:58:59+01:00 List-Id: On Wed, 28 Nov 2012 10:43:52 +0100, Georg Bauhaus wrote: > On 28.11.12 09:52, Dmitry A. Kazakov wrote: >> 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. > > If there isn't anything special about {Wide_}Character, > a Vector of Character might be an alternative, No. When I mentioned Wide_Wide_String I meant an array of code points. The logical view of *any* string type is array of code points. The only difference between different string types is in the constraints put on the code points. E.g. String has code points 0 to 255. IBM_437_String would have a non-contiguous set of code points etc. > though hated by haters of generics, I should think. I don't see how generics are relevant here. All strings are arrays of code points. They all belong to this class. No explicit conversions should be needed between them. > As a practical alternative, why not add a generalized > std::valarray)> to the language instead > of fixing it? No idea what this is supposed to mean. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de