# Converts $s to use the UTF8=1 storage format if it's not already. utf8::upgrade($s); # Converts $s to use the UTF8=0 storage format if it's not already. # Dies if it can't. utf8::downgrade($s); # Converts $s to use the UTF8=0 storage format if it's not already. # Returns false if it can't. utf8::downgrade($s, 1); #### # From Unicode to UTF-8: utf8::encode($s); utf8::encode(my $utf8 = $uni); use Encode qw( encode ); my $utf8 = encode('UTF-8', $uni); use Encode qw( encode_utf8 ); my $utf8 = encode_utf8($uni); # From UTF-8 to Unicode: utf8::decode($s); utf8::decode(my $uni = $utf8); use Encode qw( decode ); my $uni = decode('UTF-8', $utf8); use Encode qw( decode_utf8 ); my $uni = decode_utf8($utf8);