The stupid question is the question not asked | |
PerlMonks |
Text::CSV_XS and encodingby PeterKaagman (Sexton) |
on Sep 16, 2018 at 14:40 UTC ( [id://1222464]=perlquestion: print w/replies, xml ) | Need Help?? |
PeterKaagman has asked for the wisdom of the Perl Monks concerning the following question: Hi there monks The last couple of days I've been playing around with Text::CSV_XS to import some csv data. Which goes quite well up to the point where I encounter special characters. I've made myself a test file: and try to parse that with the following code: which results in the following output: I tried to resolv this by putting an encoding on the file open like "<:encoding(UTF-8)" or by adding "encoding => 'UTF-8' to the csv parameters. Neither have the desired effect. Perhaps a complete new problem, allthough I think it has something to do with it: The stream I need to parse (originally) has some jibbrish at the start. I think that is a BOM. So I tried to put "detect_bom => 1" to the csv parameters as the man pages suggests. This results in an error:
Could anyone shine a light on this for me? Peter
Back to
Seekers of Perl Wisdom
|
|