enc-converter cp1252 < file.txt > file_utf8.txt #or some-process | enc-converter shiftjis | some-utf8-process #or a mix: some-process | enc-converter koi8-r > file_utf8.txt enc-converter iso-8859-1 < file.txt | utf8-process #### #!/usr/bin/perl use strict; ( @ARGV == 1 and $ARGV[0] =~ /^\w[-\w]+$/ and ! -t ) or die "Usage: $0 inp-enc < file.inp-enc > file.utf8\n"; my $inp_enc = sprintf( ":encoding(%s)", shift ); binmode STDIN, $inp_enc; binmode STDOUT, ":utf8"; print while (<>); #### perl -MEncode -le 'print for(Encode->encodings(":all"))' #### perl -CO -pe 'BEGIN{binmode STDIN,":encoding(cp936)"}' < file.txt > file.utf8