From: Bruno Haible MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14975.6717.29684.225695@honolulu.ilog.fr> Date: Mon, 5 Feb 2001 22:25:17 +0100 (CET) To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com, Juan Manuel Guerrero Subject: Re: gettext pretest available In-Reply-To: References: <14971 DOT 212 DOT 679293 DOT 634887 AT honolulu DOT ilog DOT fr> 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 Precedence: bulk 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