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,fe66ebb10f69d726 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.74.201 with SMTP id w9mr21829802pbv.0.1331049292628; Tue, 06 Mar 2012 07:54:52 -0800 (PST) Path: h9ni46344pbe.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Convert wide_string to string (as the same byte array) Date: Tue, 6 Mar 2012 07:54:49 -0800 (PST) Organization: http://groups.google.com Message-ID: <5368448.8.1331049289886.JavaMail.geo-discussion-forums@pbbpr1> References: NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1331049290 19013 127.0.0.1 (6 Mar 2012 15:54:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 6 Mar 2012 15:54:50 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-03-06T07:54:49-08:00 List-Id: On Monday, March 5, 2012 5:58:48 PM UTC-8, Randy Brukardt wrote: > > An alternative to Adam's solution would be to use the Ada2012 encoding > functions (A.4.11), specifically Ada.Strings.UTF_Encoding.Wide_Strings, and > use a UTF-8 encoding. That would be shorter, but not fixed length, so > whether that would work for you depends on the API you are feeding these > into. This may seem like a dumb question, but does that preserve order? -- Adam