From: Manuel Gomez <mgrojo@gmail.com>
Subject: Re: GtkAda and €
Date: Sun, 12 Sep 2021 13:44:54 +0200 [thread overview]
Message-ID: <shkp7m$141$1@gioia.aioe.org> (raw)
In-Reply-To: 25b8b400-8084-46c3-a1ec-6c721623e111n@googlegroups.com
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.
next prev parent reply other threads:[~2021-09-12 11:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 17:56 GtkAda and € AdaMagica
2021-09-10 18:53 ` Dmitry A. Kazakov
2021-09-11 9:20 ` AdaMagica
2021-09-11 9:57 ` AdaMagica
2021-09-11 10:04 ` Dmitry A. Kazakov
2021-09-11 11:11 ` Emmanuel Briot
2021-09-11 12:47 ` Dmitry A. Kazakov
2021-09-11 13:26 ` AdaMagica
2021-09-11 13:51 ` AdaMagica
2021-09-11 14:13 ` Dmitry A. Kazakov
2021-09-11 17:46 ` Manuel Gomez
2021-09-12 7:04 ` AdaMagica
2021-09-12 11:44 ` Manuel Gomez [this message]
2021-09-13 7:21 ` Vadim Godunko
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox