In Perl, see that é is a variant of e,E-Collection of common programming errors
I’m making the assumption that you are sorting by English collation rules and have alphabetic text. The code below is a good start, but the real world is more complicated than that. (For example, Chinese text has different lexicographic rules depending on the context, e.g. general-purpose dictionary, karaoke song lists, electronic door bell name list, .) I cannot present a perfect solution because the question had so little information.
use 5.010;
use utf8;
use Unicode::Collate::Locale 0.96;
use Unicode::Normalize qw(normalize);
my $c = Unicode::Collate::Locale->new(locale => 'en');
say for $c->sort(qw(
eye
egg
estate
etc.
eleven
e.g.
England
ensure
educate
each
equipment
elephant
ex-
ending
écrit
));
say '-' x 40;
for my $word (qw(écrit Ëmëhntëhtt-Rê Ênio ècole Ead?eard Emma Edward ?fini)) {
say sprintf '%s should be stored under the heading %s',
$word, ucfirst substr normalize('D', $word), 0, 1;
}
__END__
each
écrit
educate
e.g.
egg
elephant
eleven
ending
England
ensure
equipment
estate
etc.
ex-
eye
----------------------------------------
écrit should be stored under the heading E
Ëmëhntëhtt-Rê should be stored under the heading E
Ênio should be stored under the heading E
ècole should be stored under the heading E
Ead?eard should be stored under the heading E
Emma should be stored under the heading E
Edward should be stored under the heading E
?fini should be stored under the heading E