Re: use gnu gettext

From: Christian Biesinger (cbiesinger@web.de)
Date: Mon Apr 29 2002 - 12:30:16 EDT

  • Next message: Andrew Dunbar: "Re: use gnu gettext"

    On Mon, Apr 29, 2002 at 12:10:31PM -0400, Dom Lachowicz wrote:
    > On Mon, 2002-04-29 at 11:58, Mike Nordell wrote:
    > > Does gettext support the UTF-32 character encoding and the UCS-4 characters
    > > AW apparently is going to (begin to) use?
    >
    > AFAIK, gettext can handle only the char datatype. However, you can store
    > encoded text inside of the file. So we could have, for example, UTF-8
    > text stored inside of the .po file. We could then convert that to a
    > native locale, UTF-32, or whatever else we'd like to as needed quite
    > easily.

    Afaik gettext can do it itself. Also, the .po file can be in UTF-32 (I
    think - at least you can specify an encoding for it).

    To get the text as UTF-8, you'd do:
            bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
            bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
            textdomain (GETTEXT_PACKAGE);

    (copied from gnome-pim's gnome2 port)

    -- 
    "They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety."
                                                     -- Benjamin Franklin
    




    This archive was generated by hypermail 2.1.4 : Mon Apr 29 2002 - 12:32:44 EDT