open my $fh, '>:encoding(windows-1250)', $path or die "open($path): $!"; print $fh $utf_string;