But ...
> Adding use utf8; was one of the first things I tried.
... if your source-code is in utf8 (check your editor settings) and you have a line like my $t='abc...едц'; you must apply use utf8;
Otherwise Perl will not know how to decode the bytes in that string, because the interpretation is not obvious.
You should clarify this, before meddling with XML.
Here a demo you should run:
OUTPUT:use v5.12; use warnings; use Data::Dump; my $t1='едц'; ddx $t1; say "length: ",length $t1; use utf8; my $t2='едц'; ddx $t2; say "length: ",length $t2;
# demo_utf8.pl:8: "\xC3\xA5\xC3\xA4\xC3\xB6" <-- bytes length: 6 # demo_utf8.pl:14: "\xE5\xE4\xF6" <-- code p +oints length: 3
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^3: UTF8 Output with XML::Feed? (use utf8)
by LanX
in thread UTF8 Output with XML::Feed?
by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |