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.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!TFl9E9FPtgqYQS0i9tziBg.user.46.165.242.91.POSTED!not-for-mail From: Manuel Gomez Newsgroups: comp.lang.ada Subject: =?UTF-8?B?UmU6IEd0a0FkYSBhbmQg4oKs?= Date: Sat, 11 Sep 2021 19:46:46 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <06dbbe8e-737e-44c2-9e9c-40e8f8aade2fn@googlegroups.com> <234ee351-3abb-445e-9d34-d5abd7a8a9b6n@googlegroups.com> <4b1683a1-6ad5-4692-b671-807db5b51f27n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gioia.aioe.org; logging-data="47743"; posting-host="TFl9E9FPtgqYQS0i9tziBg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Content-Language: en-GB X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62710 List-Id: Am 11/9/21 um 15:51 schrieb AdaMagica: > Being German, I need umlauts and € together in strings to write them to some labels. > Using Character'Val (16#E2#) & Character'Val (16#82#) & Character'Val (16#AC#) > complicates things, since umlauts are above 255 and need transformation to UTF8, > whereas the euro sequence above is already in UTF8 and must not again be transformed. > > What a mess! > When converting to UTF8, can you specify that you are using Latin-9 (ISO-8859-15), instead of Latin-1? Latin-9 is equivalent to Latin-1 plus the Euro sign, instead of the generic currency sign, since Latin-1 predates the Euro. In that case, it would be: Euro_Sign : constant Character := Character'Val (164); This is from Ada.Characters.Latin_9, provided by GNAT (not in the standard). Not sure, buy maybe you could type the Euro sign in the source code with the keyboard, since the representation is the same. Another option is to use ASCII only (with some encoding for umlauts and Euro sign) and then apply localization for the strings that must be "translated" to proper German.