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.81.40 with SMTP id w8mr2457227wix.0.1354054465790; Tue, 27 Nov 2012 14:14:25 -0800 (PST) Path: q13ni59224wii.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!news.mixmin.net!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: Tue, 27 Nov 2012 23:14:22 +0100 Organization: cbb software GmbH Message-ID: References: <11112110-03b1-4977-ba80-00204926ea23@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: kWJV5lTRAyCzy8lsfOrlcw.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-27T23:14:22+01:00 List-Id: On Tue, 27 Nov 2012 13:02:05 -0800 (PST), gautier_niouzes@hotmail.com wrote: > I'm looking for a IBM 437 encoded String [1] to UTF-16 Wide_String conversion. > > In the Ada 2012 standard (I found the very useful UTF-8 <-> UTF-16 conversions) ? > In GNAT ? > In some open-source package ? > TIA > > [1]: http://en.wikipedia.org/wiki/Code_page_437 What about type Map is array (Character) of Wide_Character := ( Wide_Character'Val (0), Wide_Character'Val (1), ); It is not a big deal to type 256 values. Half of them (0..127) are literals corresponding to 7-bit ASCII. That would give you UCS-2. I presume that UTF-16 is not needed in this case. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de