https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33635

--- Comment #16 from David Cook <[email protected]> ---
I'm working on a similar problem in labels/label-create-csv.pl and I noticed
adding the BOM isn't enough in all cases.

With certain data, for some reason, it doesn't come out UTF-8 encoded. It comes
out Latin-1 encoded instead. I think because it bumps into things like \xF6
which are actually Unicode codepoints and not UTF-8 bytes. But if I explicitly
state the output is UTF-8 under the BOM print then all is well:

binmode STDOUT, ':encoding(UTF-8)';

Text::CSV_XS explains this a bit https://metacpan.org/pod/Text::CSV_XS#Unicode

And... looking at reports/guided_reports.pl it looks like we get around that
problem because we're using Text::CSV::Encoded. But first decoding and
scrubbing the string for the header? Interesting... 

Looks like Text::CSV::Encoded was added back in 2014 and can still use
Text::CSV_XS under the hood, so that's good...

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to