Just another Perl shrine | |
PerlMonks |
[SOLVED] encoding troubleby Skeeve (Parson) |
on Apr 26, 2019 at 14:33 UTC ( [id://1233018]=perlquestion: print w/replies, xml ) | Need Help?? |
Skeeve has asked for the wisdom of the Perl Monks concerning the following question: I wrote a script which reads an UTF8 File, extracts data, and writes out some more UTF8 files. The strange thing is: The resulting files are broken. They seem to no longer be UTF8. I boild the issue down to this small script which just pipes the input through:
Having an input file containing trallalala äöüÄÖÜß And calling my script with:
The resulting output testfile.txt looks like shwn below (There seem to be some unprintable characters between the last Ãs) trallalala äöüÃÃÃà When I do not open '>:utf8', the output looks correct, but I'm puzlled about what's going on here. What am I doing wrong? Where is my misunderstanding? s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{% +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
Back to
Seekers of Perl Wisdom
|
|