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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Out_File , excess line Date: Tue, 9 Feb 2016 18:00:25 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <1efc2eae-d75a-4317-b4af-3032dcbe487d@googlegroups.com> NNTP-Posting-Host: LNA1TkTuMxfwTHzeJdi6nA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:29461 Date: 2016-02-09T18:00:25+01:00 List-Id: On 2016-02-09 16:07, comicfanzine@gmail.com wrote: > Encoding is UTF-8 . > > So , at the end , it would be : > > Stream_Element --> To Characters --> To String or Unbounded_String . No. Technically Unicode characters are not String characters. It would be Stream_Element -> Octet (Character'Val (Octet)) -> String UTF-8 encoded Once Unicode character encoded as a chain of Ada's Character. > Is there a shorter method than this kind of type conversion , for > not having the excess line and copy-paste all the lines ? It is as short as it can be. You can deploy some tricks assuming Storage_Element and arrays representation same as for String, but it would not be a great idea. Why do you need it shorter? If you are going to use Unbounded_String for text processing that will be much a bigger performance and memory hit than just one string copy. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de