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

Attachment: msg24090/pgp00000.pgp
Description: PGP signature

Reply via email to