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=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:aa01:: with SMTP id d1mr5120201qvb.47.1631430287620; Sun, 12 Sep 2021 00:04:47 -0700 (PDT) X-Received: by 2002:a25:4789:: with SMTP id u131mr7579558yba.531.1631430287387; Sun, 12 Sep 2021 00:04:47 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.mixmin.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: Sun, 12 Sep 2021 00:04:47 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 94.31.101.123 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: <25b8b400-8084-46c3-a1ec-6c721623e111n@googlegroups.com> Subject: =?UTF-8?B?UmU6IEd0a0FkYSBhbmQg4oKs?= From: AdaMagica Injection-Date: Sun, 12 Sep 2021 07:04:47 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62711 List-Id: Manuel Gomez schrieb am Samstag, 11. September 2021 um 19:46:52 UTC+2: > When converting to UTF8, can you specify that you are using Latin-9=20 > (ISO-8859-15), instead of Latin-1? Latin-9 is equivalent to Latin-1 plus= =20 > the Euro sign, instead of the generic currency sign, since Latin-1=20 > predates the Euro.=20 >=20 > In that case, it would be:=20 >=20 > Euro_Sign : constant Character :=3D Character'Val (164);=20 >=20 > This is from Ada.Characters.Latin_9, provided by GNAT (not in the=20 > standard). Not sure, buy maybe you could type the Euro sign in the=20 > source code with the keyboard, since the representation is the same.=20 In Gnat Studio, you can set the encoding (from the file's context menu choose "Properties...") to Latin_9. Then the character 164 is displayed as = =E2=82=AC in the Ada source file. You can even use the =E2=82=AC key on the keyboard.= That does not help, however, since Unicode is based on Latin_1, and when this is transformed to UTF8, the currency character appears on the GtkAda GUI. > Another option is to use ASCII only (with some encoding for umlauts and= =20 > Euro sign) and then apply localization for the strings that must be=20 > "translated" to proper German. I indeed use Character 164 as a placeholder in the Ada source code. When transforming to UTF8, I search for this character first, transform the head string, insert the Euro sequence and transform the tail string recursively. This works.