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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:254a:: with SMTP id g71-v6mr2121575itg.33.1540999713394; Wed, 31 Oct 2018 08:28:33 -0700 (PDT) X-Received: by 2002:aca:ad0a:: with SMTP id w10-v6mr177166oie.2.1540999713179; Wed, 31 Oct 2018 08:28:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!75-v6no151466itm.0!news-out.google.com!l70-v6ni170itb.0!nntp.google.com!75-v6no151461itm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 31 Oct 2018 08:28:32 -0700 (PDT) In-Reply-To: <74537c7a-18dd-421a-b3c2-6919285006cd@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=151.249.135.130; posting-account=M7mWIgoAAACGA_Fxpu1-vAqIUttmwREB NNTP-Posting-Host: 151.249.135.130 References: <74537c7a-18dd-421a-b3c2-6919285006cd@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: windows-1251 to utf-8 From: eduardsapotski@gmail.com Injection-Date: Wed, 31 Oct 2018 15:28:33 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:54730 Date: 2018-10-31T08:28:32-07:00 List-Id: Let's make it easier. For example: ------------------------------------------------------------------ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO; with AWS.Client; use AWS.Client; with AWS.Messages; use AWS.Messages; with AWS.Response; use AWS.Response; procedure Main is HTML_Result : Unbounded_String; Request_Header_List : Header_List; begin Request_Header_List.Add(Name => "User-Agent", Value => "Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0"); HTML_Result := Message_Body(Get(URL => "http://www.sql.ru/", Headers => Request_Header_List)); Put_Line(HTML_Result); end Main; ------------------------------------------------------------------ My linux terminal (default UTF-8) show: https://photos.app.goo.gl/EPgwKoiFSuwkJvgSA If set encoding in terminal Windows-1251 - all is well: https://photos.app.goo.gl/goN5g7uofD8rYLP79 Are there standard ways to solve this problem?