http://www.perlmonks.org?node_id=636885


in reply to How can I create an UTF8 encoded txt file contains strings like "aaaa"?

If you want to have only ASCII characters in that file then you don't need to warry about the encoding - just print the characters into the file. For all ASCII characters their UTF8 encoding is identical as ASCII - or in other words UTF8 is an extension of ASCII - it is different only on characters that don't belong to ASCII.