On 2019-12-10 13:50, ToddAndMargo via perl6-users wrote:
Hi All,
My unicode keeper. It is a work in progress. Pelase
comment, if you be of a mind to.
Do we use `U2248 ≈` at all? Maybe I just use that on in writing,
instead of ~
-T
Today's revised revision with new additions and ammendments.
Ad no kittens.
Perl6: Unicode characters:
References:
https://en.wikipedia.org/wiki/Quotation_mark#Curved_quotes_and_Unicode
https://docs.raku.org/language/quoting
https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode#Mathematical_Operators_block
https://www.techsupportalert.com/content/how-easily-insert-special-symbols-and-characters-windows-part-ii.htm
Unicode characters are convenient to use to avoid having
to escape things.
To enable Unicode keyboard input in Windows, install the following
registry key and reboot:
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Input Method]
"EnableHexNumpad"="1"
From a standard keyboard:
Some useful Unicode characters:
Notes:
Windows: you must use the `+` from the keypad, not the regular
keyboard
Linux: does not work in xterm's or terminals without special
modifications
UFF62 「 Linux: <Ctrl><Shift>uff62 Windows: <alt><+>ff62
UFF62 」 Linux: <Ctrl><Shift>uff63 Windows: <alt><+>ff63
U201D „ Linux: <Ctrl><Shift>u201D Windows: <alt><+>201D
U00AB « Linux: <Ctrl><Shift>u00AB Windows: <alt><+>00AB
U00BB » Linux: <Ctrl><Shift>u00BB Windows: <alt><+>00BB
U2260 ≠ Linux: <Ctrl><Shift>u2260 Windows: <alt><+>2260
U2248 ≈ Linux: <Ctrl><Shift>u2248 Windows: <alt><+>2248
Some uses:
For use as a literal quote in a regex (`Q[]` does not work inside
regex's)
say so Q[A:\] ~~ / 「:\」 /;
True
say so Q[A:\] ~~ / 「:/」 /;
False
For accessing keys inside a hash with a variable:
my %h= a=>"A", b=>"B";
my $i= "b";
say %h<$i>;
(Any)
say %h<<$i>>;
B
say %h«$i»;
B
say %h{$i};
B
Math:
say so 5 ≠ 6
True
say so 5 ≠ 5
False