[Tcsh] backslashed escape sequences in echo
H.Merijn Brand
tcsh at tux.freedom.nl
Tue Jul 2 11:12:20 UTC 2024
On Tue, 2 Jul 2024 11:52:29 +0200, Michal Szymanski <msz at astrouw.edu.pl> wrote:
> Hi,
>
> I've just noticed a changed behavior of 'echo' command with octal
> \xxxx sequence. Most of the machines run Rocky Linux 8.10 with tcsh
> 6.20.00. One of my aliases includes command (simplified here)
> echo "a \0140 b"
> which has been working for years giving
> a ` b
>
> Now on my Ubuntu desktop recently upgraded to 24.04, coming (what a
> coincidence :) with tcsh 6.24.10, this has broke and the output is now
> a
> 0 b
That change happened between 6.23.00 and 6.23.01
38 commits (merge commits excluded)
I just verified that e6c9f58b10797e1b793c70782aad239f7087a037 (my work
to improve Unicode support) is the cause.
https://github.com/tcsh-org/tcsh/commit/06915a414e185d314d5117b04ee460e441cbe962
> To get the previous behavior, I have to remove the 0, echo "a \140 b"
>
> It works as such even if I change $echo_style from the default "both"
> to "sysv" when it should, AFAIU, mimic the SYSV behavior of echo(1).
> This is not true as the echo(1) requires 0 before 1 to 3 octal digits,
> at least in the manual:
>
> \0NNN byte with octal value NNN (1 to 3 digits)
>
> In the real world, however, both versions give the octal-coded char:
>
> >/usr/bin/echo -e "a \140 b"
> a ` b
> >/usr/bin/echo -e "a \0140 b"
> a ` b
>
> Is that to be expected? When was it introduced? I cannot find any
> "Changelog" file in tcsh sources. There is "Fixes" file, and "BUGS"
> file, but no Changelog. The most recent mention of 'octal' in "Fixes"
> is from May 12, 2010 and refers to V6.17.02.
>
> best, Michal
>
--
H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.37 porting perl5 on HP-UX, AIX, and Linux
https://tux.nl/email.html http://qa.perl.org https://www.test-smoke.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20240702/2472e082/attachment.asc>
More information about the Tcsh
mailing list