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: Sun, 12 Sep 2021 13:44:54 +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> <25b8b400-8084-46c3-a1ec-6c721623e111n@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="1153"; 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 X-Notice: Filtered by postfilter v. 0.9.2 Content-Language: en-GB Xref: reader02.eternal-september.org comp.lang.ada:62714 List-Id: Am 12/9/21 um 9:04 schrieb AdaMagica: > 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 € > in the Ada source file. You can even use the € 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. I suppose this is because the conversion assumes Latin-1 input, and it is acceptable given that String type should be in that encoding, but with a general string conversion library, like iconv, you can convert between any 8-bit character encoding and UTF-8. Here an Ada binding to iconv (I haven't used it): https://github.com/ytomino/iconv-ada And Matreshka League has several 8-bit character encodings, although it lacks ISO-8859-15. It should be easy to add ISO-8859-15 based on ISO-8859-1: http://forge.ada-ru.org/matreshka/wiki/League/TextCodec But I guess what you are already doing is the easiest approach. It's just one character.