$ perl -E'say "\N{U+00F1}";' ? <--- Actually U+FFFD, what you posted $ perl -MEncode -E'say encode("UTF-8", "\N{U+00F1}");' ñ