my $line = encode("utf8",$lineo); open(TEK,">:utf8","temp.tex"); print TEK $line;