Groups | Search | Server Info | Login | Register


Groups > comp.lang.ada > #49491

Re: GtkAda and €

From Manuel Gomez <mgrojo@gmail.com>
Newsgroups comp.lang.ada
Subject Re: GtkAda and €
Date 2021-09-11 19:46 +0200
Organization Aioe.org NNTP Server
Message-ID <shiq27$1ejv$1@gioia.aioe.org> (permalink)
References (1 earlier) <shg9ih$htv$1@gioia.aioe.org> <234ee351-3abb-445e-9d34-d5abd7a8a9b6n@googlegroups.com> <shhuvp$1sik$1@gioia.aioe.org> <4b1683a1-6ad5-4692-b671-807db5b51f27n@googlegroups.com> <e8b60ad9-b68f-4520-8f1d-1c8edfa03662n@googlegroups.com>

Show all headers | View raw


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.

Back to comp.lang.ada | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-10 10:56 -0700
  Re: GtkAda and € "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-10 20:53 +0200
    Re: GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-11 02:20 -0700
      Re: GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-11 02:57 -0700
      Re: GtkAda and € "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-11 12:04 +0200
        Re: GtkAda and € Emmanuel Briot <briot.emmanuel@gmail.com> - 2021-09-11 04:11 -0700
          Re: GtkAda and € "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-11 14:47 +0200
        Re: GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-11 06:26 -0700
          Re: GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-11 06:51 -0700
            Re: GtkAda and € "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2021-09-11 16:13 +0200
            Re: GtkAda and € Manuel Gomez <mgrojo@gmail.com> - 2021-09-11 19:46 +0200
              Re: GtkAda and € AdaMagica <christ-usch.grein@t-online.de> - 2021-09-12 00:04 -0700
                Re: GtkAda and € Manuel Gomez <mgrojo@gmail.com> - 2021-09-12 13:44 +0200
            Re: GtkAda and € Vadim Godunko <vgodunko@gmail.com> - 2021-09-13 00:21 -0700

csiph-web