lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev gettext() question


From: Nelson Henry Eric
Subject: Re: lynx-dev gettext() question
Date: Tue, 17 Nov 1998 09:55:16 +0900 (JST)

> >> But some bug (example buffer overflow) can arise only whith some 
> >> translation
> >> file...
> 
> >Can you give us more information on this?  I worry because it is often
> >impossible to give a clear translation within the same length as the
> >English message.
> 
> As an example:
> 
> char tmp[100];
> sprintf(tmp, "%s",gettext("English Message little then 99 car."));
> ...
> 
> If the translated text is greater then 99 car. -> overflow
> So it's OK whith english message and can core dump with other.

If xgettext is directed correctly, either with a comment or keyword
in the source code, then this problem should not occur.  All programmers
and hackers of Lynx who plan to use messages will now have to have at
least a cursory knowledge of the variations on the gettext function.
As Jim has hinted, incorporating NLS in Lynx is no light task.  Right
now all that's there are gettext()'s, but all of these will have to be
reviewed and tweaked to meet the requirements of the sprintf(), puts()
or whatever function is calling it with whatever arguments.  (Glad I'm
not a programmer!)

__Henry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]