use open IN => ':encoding(cp1252)'; # Input files are in Windows CP1252. # All input is converted to Perl's internal encoding # (UTF-8) as it is read. use open OUT => ':utf8'; # All output will be UTF-8.