Date:        Thu, 12 Oct 2023 21:36:48 -0700
    From:        Grisha Levit <grishale...@gmail.com>
    Message-ID:  
<CAMu=brpaew1dv4h6f2gzq7hwad5gb2yk2ncf8qrjaozkirq...@mail.gmail.com>

  | There are some issues with parser output when the input has an unquoted
  | backslash followed by a raw ^A character:

The NetBSD shell (and probably other ash derived shells) used to
have issues with that as well.

The solution (for us) was to be ruthless about inserting the
CTLESC before any character that is to be treated literally,
but which might, in any context at all, be treated as magic,
(which includes literal examples of the byte used to mean CTLESC
of course) and never be tempted to "optimise" on the basis of
"the CTLESC is not needed here because...." however reasonable
the reason might sound.

It does mean always making sure that all (unescaped) CTLESC
chars are removed (or properly ignored) in every context where
a string is needed, it can never be skipped - but once all
that gets fixed, all these kinds of problems just vanish.

kre

Reply via email to