-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Townsend wrote:
> =====
> The Solaris `sed' doesn't flush the last data line if that line isn't
> terminated with a NEWLINE.  The problem surfaces in the "po" directory
> and the problem code is in the "Rules-quot" file where `msgfilter'
> passes some un-newline terminated data to a `sed' invocation (see my
> quick and dirty patch below).  If you have access to a Solaris box, you
> can duplicate the problem effects with
> 
>   > sh -c 'echo "xxx\c" | sed -e "s,^,,"'   <==  bad
>   > 
> 
> The GNU sed works correctly.
> 
>   > sh -c 'echo "xxx\c" | gsed -e "s,^,,"'  <==  good
>   xxx> 
> 
> If the Solaris `sed' is used, a `gmake dist' invocation aborts and, even
> if it didn't, the output from the code line below generates incorrect
> <msgstr ""> and <msgstr "\n"> values for a number of the lines in the
> "[EMAIL PROTECTED]" files.
> 
> The source code that I used was obtained from
> 
>   http://hg.addictivecode.org/wget/mainline

Yeah; until recently, sed did not support the [EMAIL PROTECTED]
pseudo-languages.

This behavior is apparently documented in msgfilter's section of the
manual (in the Texinfo, not the manpage).

Technically, Solaris' sed isn't wrong, as it expects a "text file" on
stdin, and by definition, all text files end in newline characters (in C
and in POSIX, IIRC).

The consequences don't seem to be severe, as broken [EMAIL PROTECTED]
message files are a minor issue; as is make dist failing on systems that
don't have certain GNU tools available (or, virtually any system that
isn't... mine :) ). However, it is annoying...

I was toying with the idea of eschewing [EMAIL PROTECTED] in favor of a true,
hand-crafted en_US.po; this might allow me to use the proper diacritics
in Hrvoje's last name, for example; and to replace the (C) with a proper
copyright mark. But I haven't committed to doing this. And I kind of
like having [EMAIL PROTECTED]; the right things grab my eye so much
better now. But then, I suppose it's a slippery slope from there to (as
I think at least one has suggested) colorizing Wget's output... :)

I'm not crazy about customizing gettext's Rules-quot (I've already had
to customize their Makefile.in.in, as it does some things I find rather
disagreeable); and even if I did, I'm not sure how to get around this
problem. I suppose one could rewrite the appropriate code with something
that invokes sed on the actual message file itself, rather than
individual strings... I'm really not sure what should be done about it. :\

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHhFkm7M8hyUobTrERAkjWAJ9kLsK5yPTkybKiSevi7pSc5C8aLACfdwHN
YQTXnOGXYz6K3t3MQ8MNvsU=
=ZHrG
-----END PGP SIGNATURE-----

Reply via email to