Last active
November 24, 2020 21:28
-
-
Save jubilatious1/b99def4cb2d02e6cef5c15b3fd102447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##https://stackoverflow.com/q/60365292/7270649 | |
say "â" ~~ /\w/; # you have to have a space following the "a" with "^" for it to work | |
#「â」 | |
say "�" ~~ /\w/; # without the space, the character doesn't look normal | |
#Malformed UTF-8 at line 1 col 6 | |
say "â".chars; # looks like 2 chars, but it says 1 char | |
#1 | |
say "â".comb.[0]; # strange, the pesky char makes the space precede the cursor as I type | |
#â | |
say "â".comb.[0 ]; # strange, the pesky char makes the space precede the cursor as I type | |
#â | |
say "â".comb.[0]; # there is a space following ']' or it won't work | |
#â | |
say "â".comb.[0 ]; # very strange, must have space before ']' | |
#â | |
say "â".comb; | |
#(â) | |
say "â".comb.[0].ord; # # same here, very strange, it makes space precede the cursor | |
#226 | |
my $a = Buf.new(226); | |
#Buf:0x<E2> | |
say $a.decode('utf8-c8'); | |
#xE2 | |
for @$a { say $_.chr; }; | |
#â | |
say (@$a).elems; | |
#1 | |
say "â" ~~ / <alpha> /; # again, must have space in the quote | |
#「â」 | |
# alpha => 「â」 | |
say "â" ~~ / <cntrl> /; | |
#Nil | |
say "----", "\n"; | |
say $a.decode; | |
#Malformed termination of UTF-8 string | |
# in block <unit> at <unknown file> line 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment