I have created a Pl file for writing the content in txt file in perl, But when we open the file in Ubuntu system it shows the content in UTF8 and in windows system the content is shown in ANSI format and the text is broken in txt file.
I want to make the file UTF8 default open in Windows system, so that the characters should not be broken.
Below is the my code
my $filename = "123.txt";
my $content = "ब लोगों के लिए एक समा sum";
open FILE, ">", $filename;
print FILE $content;
close FILE;
exit;