From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:5b8d:: with SMTP id a13mr8097005qta.130.1631517665900; Mon, 13 Sep 2021 00:21:05 -0700 (PDT) X-Received: by 2002:a25:2ccf:: with SMTP id s198mr12847832ybs.452.1631517665704; Mon, 13 Sep 2021 00:21:05 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 13 Sep 2021 00:21:05 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=87.117.61.165; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww NNTP-Posting-Host: 87.117.61.165 References: <06dbbe8e-737e-44c2-9e9c-40e8f8aade2fn@googlegroups.com> <234ee351-3abb-445e-9d34-d5abd7a8a9b6n@googlegroups.com> <4b1683a1-6ad5-4692-b671-807db5b51f27n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9b5142ae-7937-4bc9-9095-7b617cafc5e1n@googlegroups.com> Subject: =?UTF-8?B?UmU6IEd0a0FkYSBhbmQg4oKs?= From: Vadim Godunko Injection-Date: Mon, 13 Sep 2021 07:21:05 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62719 List-Id: On Saturday, September 11, 2021 at 4:51:41 PM UTC+3, AdaMagica wrote: > Being German, I need umlauts and =E2=82=AC together in strings to write t= hem to some labels.=20 > Using Character'Val (16#E2#) & Character'Val (16#82#) & Character'Val (16= #AC#)=20 > complicates things, since umlauts are above 255 and need transformation t= o UTF8,=20 > whereas the euro sequence above is already in UTF8 and must not again be = transformed.=20 >=20 > What a mess! Character encoding in source code, input-output and GUI is know mess. There= is Ada 2022 library that provides high level API to process text informati= on, see https://github.com/AdaCore/VSS You can try to use Virtual_String everywhere, and do encoding conversion on= ly to get/pass text from/to Gtk+ or input-output streams. Note, if you want to write characters outside of the ASCII range in the sou= rce code you will need to use UTF8 for source files and provide -gnatW8 swi= tch to compiler. It may breaks compilation of the old code sometimes :(