use strict; use warnings; use utf8; use Encode qw(encode_utf8); binmode STDOUT, ':encoding(UTF-8)'; my $s = "sämple\n"; print uc $s; print uc encode_utf8($s); __END__ Output: SÄMPLE SäMPLE