Date: Tue, 25 Apr 2000 11:17:32 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: salvador cc: djgpp-workers AT delorie DOT com Subject: Re: GNU Gettext and NLS support for DJGPP In-Reply-To: <39045FB0.EDF6B106@inti.gov.ar> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Mon, 24 Apr 2000, salvador wrote: > > Another possibility is to perform the translation on the fly, at run > > time. This would mean we need to augment the gettext sources with > > additional code that would convert all non-ASCII characters from their > > Unix encoding to the corresponding DOS encoding. > > Even when I don't like such a magic translations Care to explain why don't you like them? > I really think gettext should have a hook to allow it. > But I think it should provide: > > 1) A function to process all the strings loaded from the .mo > file. So we recode it *once*. We could provide these missing features ourselves, if we decide they are needed. > 2) A function to reload all the strings (that's a need for my editor > because it can change encodings on the fly ;-) Why do you need to reload? All you need is to run a conversion code, like in 1), to convert from one encoding to another. Assuming the conversions are lossless, this should be possible and relatively easy, provided that you have a conversion library such as librecode. > At first the are some mechanism to select the code page. I don't > remmember it and I don't know why it isn't really implemented. I think is > something with the names of the language directories. I don't understand what you are relating to here. Are you talking about DOS or Unix? On Unix, you select the locale and the encoding by setting environment variables. AFAIK, gettext does look at those (in `bindtextdomain'). > IMHO gettext files (.mo) should say (internally) what encoding was used to > create these files I think the .gmo files do say how they are encoded. > In the case of my editor I have the spanish files encoded in PC437 and I use > recode for convertion to create the UNIX version of the files. I do it in the > installation process. > Using option 2 all the native files (used by RHIDE my editor and how > know what else) will break. They won't break if we support a no-op ``conversion'', for those files which are encoded natively.