From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp1-2.free.fr!not-for-mail Subject: Re: Ada and Unicode Newsgroups: comp.lang.ada References: <607b5b20$0$27442$426a74cc@news.free.fr> <660e25a5-506b-43c0-b4ac-e7738e5500e5n@googlegroups.com> <607d4d46$0$3684$426a34cc@news.free.fr> <58790149-74f6-413f-8083-44fadaa8f10bn@googlegroups.com> From: DrPi <314@drpi.fr> Date: Mon, 19 Apr 2021 17:51:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <58790149-74f6-413f-8083-44fadaa8f10bn@googlegroups.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Message-ID: <607da712$0$12707$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 19 Apr 2021 17:51:46 CEST NNTP-Posting-Host: 82.65.30.55 X-Trace: 1618847506 news-1.free.fr 12707 82.65.30.55:59927 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:61849 List-Id: Le 19/04/2021 à 15:50, Maxim Reznik a écrit : > понедельник, 19 апреля 2021 г. в 12:28:39 UTC+3, DrPi: >> Le 19/04/2021 à 10:29, Maxim Reznik a écrit : >>> воскресенье, 18 апреля 2021 г. в 01:03:14 UTC+3, DrPi: >>>> In some languages, it is possible to set a tag at the beginning of the >>>> source file to direct the compiler which encoding to use. >>> >>> You can do this with putting the Wide_Character_Encoding pragma (This is a GNAT specific pragma) at the top of the file. >>> >> Wide and Wide_Wide characters and UTF-8 are two distinct things. >> Wide and Wide_Wide characters are supposed to contain Unicode code >> points (Unicode characters). >> UTF-8 is a stream of bytes, the encoding of Wide or Wide_Wide characters. > > Yes, it is. > >> What's the purpose of "pragma Wide_Character_Encoding (UTF8);" ? > > This pragma specifies the character encoding to be used in program source text... > > https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_defined_pragmas.html#pragma-wide-character-encoding Good to know. > > I would suggest also this article to read: > > https://two-wrongs.com/unicode-strings-in-ada-2012 > I think I've already read it. But will do again. > Best regards, > Thanks