[Tcsh] "Readable" Unicode in setenv
H.Merijn Brand
tux at freedom.nl
Thu Dec 9 16:15:30 UTC 2021
On Thu, 9 Dec 2021 13:47:52 +0200, Kimmo Suominen <kim at netbsd.org> wrote:
> Hi all,
>
> I've committed code that implements the dollar-single-quote feature.
> https://github.com/tcsh-org/tcsh/commit/bda86ab754b56d5a8983b554cb1dfffad2f3b43d
>
> What should we do about these differences:
>
> We do:
> - \uNNNNNN for unicode code points (six hex digits)
exactly 6 or 2..6?
> - \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}
\x{NNN} in perl is an alias to \uNNN as in strings \uNNN is not supported
$ perl -MDP -wE'DPeek "Foo\xE5"'
PV("Foo\345"\0)
$ perl -MDP -wE'DPeek "Foo\x{E5}"'
PV("Foo\345"\0)
$ perl -MDP -wE'DPeek "Foo\x00E5"'
PV("Foo\0E5"\0)
$ perl -MDP -wE'DPeek "Foo\x{00E5}"'
PV("Foo\345"\0)
All over 0xFF will be implicit Unicode (UTF-8)
$ perl -MDP -COE -wE'DPeek "Foo\x{20AC}"'
PV("Foo\342\202\254"\0) [UTF8 "Foo\x{20ac}"]
$ perl -MDP -wE'DPeek "Foo\x{01f685}"'
PV("Foo\360\237\232\205"\0) [UTF8 "Foo\x{1f685}"]
$ perl -MDP -wE'DPeek "Foo\u01f685"'
PV("Foo01f685"\0)
I know I saw input methods that allowed \uNNN and U+NNN to be the same
(N being 1 .. 8 digits)
> FreeBSD sh(1) documents these:
> - \uNNNN and \uNNNNNNNN for unicode code points (four and eight hex digits)
> - \xNN for a byte in hex, where NN can be 1 or more hex digits and
> only last two are used
>
> We are also missing \cC for a control character. I would have added
> this but ran out of steam for now.
>
> Cheers,
> + Kimmo
--
H.Merijn Brand https://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.33 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/20211209/cf11c8ab/attachment-0002.asc>
More information about the Tcsh
mailing list