Unicode Support in Perl 6

Perl 6 has a high level of support of Unicode.

You can access Unicode codepoints by name: Rakudo supports all Unicode 9.0 names.

say "\c[PENGUIN]"# OUTPUT: «🐧␤» 
say "\c[BELL]";    # OUTPUT: «🔔␤» (U+1F514 BELL) 

Additionally, all Unicode codepoint names/named seq/emoji sequences are now case-insensitive: [Starting in 2017.02]

say "\c[latin capital letter E]"# OUTPUT: «E␤» (U+0045) 

Name Aliases

By name alias. Name Aliases are used mainly for codepoints without an official name, for abbreviations, or for corrections (Unicode names never change). For full list of them see here.

Control codes without any official name:

say "\c[ALERT]";     # Not visible (U+0007 control code (also accessible as \a)) 
say "\c[LINE FEED]"# Not visible (U+000A same as "\n") 


# This one is a spelling mistake that was corrected in a Name Alias: 


say "\c[ZWJ]".uniname;  # OUTPUT: «ZERO WIDTH JOINER␤» 
say "\c[NBSP]".uniname# OUTPUT: «NO-BREAK SPACE␤» 

Named Sequences

You can also use any of the Named Sequences, these are not single codepoints, but sequences of them. [Starting in 2017.02]


Emoji Sequences

Rakudo has support for Emoji 4.0 (the latest non-draft release) sequences. For all of them see: Emoji ZWJ Sequences and Emoji Sequences. Note that any names with commas should have their commas removed, since Perl 6 uses commas to separate different codepoints/sequences inside the same \c sequence.

say "\c[woman gesturing OK]";         # OUTPUT: «🙆‍♀️␤» 
say "\c[family: man woman girl boy]"# OUTPUT: «👨‍👩‍👧‍👦␤»