bug-gettext
[Top][All Lists]
Advanced

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

Re: Coordination on standardizing gettext() in future POSIX


From: Bruno Haible
Subject: Re: Coordination on standardizing gettext() in future POSIX
Date: Wed, 22 Jan 2020 14:14:00 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Jörg Schilling wrote:
> > It is well-known that the escape sequence expansion in 'echo' was different
> > in System V and BSD systems. You can assume that when Ulrich Drepper started
> > out writing GNU gettext in 1995, he did NOT want to copy the System V 
> > behaviour
> > of 'echo' into the 'gettext' program.
> 
> So in other words, this is a result of not following the POSIX standard from 
> the beginning? What you call "System V behaviour" is the official required 
> POSIX 
> behavior for implementations that like to use the UNIX brand name.

You can view it like this. I view it as a failure to provide a useful standard
in this place (the 'echo' command). Even POSIX acknowledges this [1]:

  "It is not possible to use echo portably across all POSIX systems unless
   both -n (as the first argument) and escape sequences are omitted."

  "The two different historical versions of echo vary in fatally incompatible
   ways."

With gettext(1), we are now in the same situation: Solaris gettext(1) behaves
like System V 'echo', and GNU gettext(1) behaves like BSD 'echo' (on purpose,
not by mistake, otherwise it would not have a '-e' option, borrowed from BSD
'echo').

It varies "in fatally incompatible ways" here too.

Would it be useful to copy the POSIX echo(1) tragedy and produce the same
thing once again, as a POSIX gettext(1) tragedy? I don't think so. Even the
POSIXLY_CORRECT subterfuge variable would not be of real help to solve this
dilemma: People avoid this variable because it has side effects on several
programs, some of them negative.

> It seems that the text in LI18NUX-2000-amd4.pdf is a comprimise negotiated 
> between 
> Sun and some GNU people that unfortunately is ignored by the GNU 
> implementation in 
> the default case of using gettext(1).

The appendices in the LI18NUX were written down in a hurry at the end of the
specification process. The LI18NUX group spent a lot of time discussing what is
Unicode support Level 1, Level 2, etc., and at the end delegated one person to
do a copy&paste of existing documentation for the appendices. As far as I 
recall,
there was no (or hardly any) critical review and no discussion any more at this
point. This explains why the gettext(1) documentation in there is ambiguous.

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html




reply via email to

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