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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:b103:: with SMTP id a3mr12505094qkf.261.1618840242714; Mon, 19 Apr 2021 06:50:42 -0700 (PDT) X-Received: by 2002:a25:1883:: with SMTP id 125mr17107506yby.465.1618840242494; Mon, 19 Apr 2021 06:50:42 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 19 Apr 2021 06:50:42 -0700 (PDT) In-Reply-To: <607d4d46$0$3684$426a34cc@news.free.fr> Injection-Info: google-groups.googlegroups.com; posting-host=2a03:7380:380d:3b:3cde:a100:9d47:ff55; posting-account=K1cP1QoAAAD_GR6kW2Td0NqGqGBLRE8h NNTP-Posting-Host: 2a03:7380:380d:3b:3cde:a100:9d47:ff55 References: <607b5b20$0$27442$426a74cc@news.free.fr> <660e25a5-506b-43c0-b4ac-e7738e5500e5n@googlegroups.com> <607d4d46$0$3684$426a34cc@news.free.fr> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <58790149-74f6-413f-8083-44fadaa8f10bn@googlegroups.com> Subject: Re: Ada and Unicode From: Maxim Reznik Injection-Date: Mon, 19 Apr 2021 13:50:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61847 List-Id: =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 19 =D0= =B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2021 =D0=B3. =D0=B2 12:28:39 UTC+3, DrPi: > Le 19/04/2021 =C3=A0 10:29, Maxim Reznik a =C3=A9crit :=20 > > =D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=81=D0=B5=D0=BD=D1=8C=D0=B5, 18 = =D0=B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2021 =D0=B3. =D0=B2 01:03:14 UTC+3, Dr= Pi:=20 > >> In some languages, it is possible to set a tag at the beginning of the= =20 > >> source file to direct the compiler which encoding to use.=20 > >=20 > > You can do this with putting the Wide_Character_Encoding pragma (This i= s a GNAT specific pragma) at the top of the file. > > > Wide and Wide_Wide characters and UTF-8 are two distinct things.=20 > Wide and Wide_Wide characters are supposed to contain Unicode code=20 > points (Unicode characters).=20 > 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 t= ext... https://docs.adacore.com/gnat_rm-docs/html/gnat_rm/gnat_rm/implementation_d= efined_pragmas.html#pragma-wide-character-encoding I would suggest also this article to read: https://two-wrongs.com/unicode-strings-in-ada-2012 Best regards,