Skip to content

Files

Latest commit

2489f76 · Jan 23, 2014

History

History
15 lines (11 loc) · 234 Bytes

File metadata and controls

15 lines (11 loc) · 234 Bytes

Encode and decode in Perl 6

UTF-8 is the default.

$utf8 = $str.encode;
$str  = $utf8.decode;

Other encodings can be explicitly specified.

$utf16 = $str.encode('UTF-16');
$str   = $utf16.decode('UTF-16');