Follow-up Comment #19, bug #67207 (group groff):

[comment #18 comment #18:]
> You have probably realised the culprit is "echo". Looking at the -Z output:-

I had not, but that would have been one of the first places I looked.

I did builds on my Debian(-ish) bullseye system, on Android/Termux, and on
Solaris 10 and 11 using Git HEAD, and could not reproduce this problem on any
of them.

Nevertheless, `echo` is a
[https://lists.gnu.org/archive/html/groff/2024-10/msg00069.html notorious
source of trouble].


> C\-
> h24
> tname
> C\-
> h24
> tcan
> C\-
> h24
> tyou
> C\-
> h24
> tbelieve
> C\-
> h24
> tit
> n40 0
> f1
> V400
> H216
> t\%\-\-equally\-bafflingly\-garrulous\-and\-interminable\-option


> You can see the .SY line has interpreted "\\-" as "\-" but the following line
> it has stayed as "\\-". Must be a bug in echo, slash interpretation is either
> on or off, not "on sometimes"!! Using "echo -e" for $input3 avoids the bug.

[https://pubs.opengroup.org/onlinepubs/9799919799/utilities/echo.html
Unfortunately that's not portable, either.]  I'll have to use _printf_(1).

> [derij@pip build (master)]$ sh --version
> GNU bash, version 5.2.15(1)-release (x86_64-mageia-linux-gnu)

My build environments:

Solaris 10: bash 3.2.51
Solaris 11: bash 4.4.19
Debian bullseye: bash 5.1.4
Android/Termux: bash 5.2.37

All succeed for me.

I can't explain the discrepant outcomes.  It may be that there is a second
problem, but backslashes in the argument to `echo` are a hazard
regardless--thanks for catching this!  I'll do something about it and see if
that clears up the failures for you and Dave.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67207>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to