www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/05/16:40:33

From: Bruno Haible <haible AT ilog DOT fr>
MIME-Version: 1.0
Message-ID: <14975.6717.29684.225695@honolulu.ilog.fr>
Date: Mon, 5 Feb 2001 22:25:17 +0100 (CET)
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp-workers AT delorie DOT com,
Juan Manuel Guerrero <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Subject: Re: gettext pretest available
In-Reply-To: <Pine.SUN.3.91.1010204083936.20547J@is>
References: <14971 DOT 212 DOT 679293 DOT 634887 AT honolulu DOT ilog DOT fr>
<Pine DOT SUN DOT 3 DOT 91 DOT 1010204083936 DOT 20547J AT is>
X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Eli Zaretskii writes:

> > This gettext pretest has the ability to do character set conversion on
> > the fly, e.g. from ISO-8859-1 to CP437.
> 
> This is great news!
> 
> What does on-the-fly conversion do for characters which cannot be encoded 
> with cp437 (if I take the above example)?

That depends on the iconv implementation. The portable libiconv
attempts a few "customary" replacements; if they fail, gettext will
return the unconverted message (i.e. at least the ASCII portions of it
will be legible).

> Can the target charset (cp437 in the above example) be changed 
> dynamically at run time, or is it statically determined for each .po 
> file at build time?

It can be changed at runtime, using the bind_textdomain_codeset
function, but only before the first message lookup. The argument to
pass should depend on the character set of the user's console
window. IIRC, there is a Windows function GetOEMCP() for this purpose.
You then have to convert it to a string:   sprintf("CP%d", codepage)
before you can pass it to bind_textdomain_codeset.

> I have also finished a DJGPP port of recode-3.6 that uses
> GNU libiconv and a patch for DJGPP support for GNU libiconv-1.5.1.

Thanks a lot!

> The main difficulty in GNU libiconv-1.5.1 is the testsuit and the
> old libtool set that is used in this package.

Has a libtool version coping with DJGPP been released? All I have is
libtool 1.3.5.

Bruno

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019