Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Lost in compressed encodingsby Skeeve (Parson) |
on Apr 06, 2020 at 08:22 UTC ( [id://11115120]=perlquestion: print w/replies, xml ) | Need Help?? |
Skeeve has asked for the wisdom of the Perl Monks concerning the following question: This is a follow up of my Lost in encodings question. Thanks to the answers given there I was able to solve that issue, but now I'm clueless again as I now need to read in compressed (gzip) UTF-8 files and I do not know how to convince perl to read them as UTF-8. My code for opening the files is:
When reading uncompressed data, it works fine as I could verify with the help given in my previous thread. I did so by setting the debugger to UTF-8. When reading uncompressed data the Umlaut "ü" is correctly displayed as "ü". When reading the same data from a compressed file the "ü" is displayed as "ü". I have no idea how to make perl consider the compressed data as UTF-8? s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{% +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
Back to
Seekers of Perl Wisdom
|
|