perl -CO -pe 'BEGIN{binmode STDIN,":encoding(cp936)"}' < file.txt > file.utf8