use strict; use warnings; use 5.010; use Encode; my $unicode_str = "\x{00a9}"; my $utf8_str = encode('utf-8', $unicode_str); say $utf8_str; #copyright symbol my $line = "$utf8_str hello world"; $line =~ s/$utf8_str/\\textcopyright/; say $line; #\textcopyright hello world #Or you can just start with the UTF-8 character #for the copyright symbol: $line = "\xC2\xA9 hello world"; say $line; #copyright symbol followed by 'hello world' $line =~ s/\xC2\xA9/\\textcopyright/; say $line; #\textcopyright hello world #### 1 => chinese character for the new year 2 => japanese character for fish 3 => happy face ... ... 60,000 => mongolian character for beef ...