On Tue Jun 19 00:14:20 2007, martin@senfdax.de wrote: > This is a bug report for perl from martin@senfdax.de, > generated with the help of perlbug 1.35 running under perl v5.8.8. > > > % cat datei > eine test datei > die "u "a "o > % file datei > datei: ASCII text > % cp datei datei.bk > % perl -wpi -e 'use encoding "utf8"; s/"a/ä/' datei > % file datei > datei: ISO-8859 text > % perl -wp -e 'use encoding "utf8"; s/"a/ä/' datei.bk > datei.neu > % file datei.neu > datei.neu: UTF-8 Unicode text > > my xterm is also utf8; I think both files should be utf8, i dont know > why "datei" is changed to latin1. ‘use encoding "utf8"’ tells perl that the script you are giving it to run is in UTF-8 encoding. It does not affect the input and output streams. For that, try ‘use open ":utf8"’. See also ‘perldoc -f binmode’ and the -C option in perlrun.Thread Next