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

sinbao has asked for the wisdom of the Perl Monks concerning the following question:

I failed to do that by code
__BEGIN__
open MyFile, ">:encoding(utf-8 )", "a.txt";
print MyFile "aaaa";
close MyFile
__END__

Question is, I want to write a visual studio solution file (.sln) which can't be recognized if it is not encoded in UTF-8 although the characters in it are all ASCII