[Tcsh] "Readable" Unicode in setenv

Kimmo Suominen kim at netbsd.org
Thu Dec 9 16:54:03 UTC 2021


On Thu, 9 Dec 2021 at 18:34, H.Merijn Brand <tcsh at tux.freedom.nl> wrote:
> On Thu, 9 Dec 2021 13:47:52 +0200, Kimmo Suominen <kim at netbsd.org> wrote:
> > What should we do about these differences:
> >
> > We do:
> > - \uNNNNNN for unicode code points (six hex digits)
>
> exactly 6 or 2..6?

I think it is actually 1..6. Or was. I changed it to:

- \uNNNN (where NNNN is 1-4 hex digits)
- \UNNNNNN (where NNNNNN is 1-6 hex digits)

This was to match what other shells do with \u -- they allow at most 4 digits.

> > - \xNN and \x{NNNN} for "ASCII" char in hex (how is NNNN ASCII?)
>
> in perl \xNN is 8-bit clean, \x{NNNN} can be \x{N} .. \x{NNNNNNNN}

I did not change \x{NNNN} but I documented it incorrectly: it indeed
allows up to 8 digits, not just 4. I will fix the manual. Based on the
earlier comments from Corinna, I have a feeling that this is broken
for Cygwin and Windows, though...

> > We are also missing \cC for a control character.

I've added \cC -- it is a close copy of the code for handling in ^c in
parseescape(). Note that the $'...' syntax does not allow for ^c,
though: it only calls parseescape() for \ (not ^).

Cheers,
+ Kimmo


More information about the Tcsh mailing list