Try this:
#!/usr/bin/perl use warnings; use strict; use Encode qw( is_utf8 ); use XML::Simple; use Data::Dumper; my $raw_file = do { local $/; <> }; my $xml = XMLin( $raw_file, forcearray => [], suppressempty => undef, +); print Dumper ( $xml ); print is_utf8 $xml->{'artist'}; print "\n";
Does Perl say the UTF-8 flag is on? It should not, by the dump of your hash. Interestingly, XML::Simple converts to UTF-8 for me (and that's a good thing; maybe you should look into how to ask it to do so).
The next question, then, is what encoding your terminal assumes. I have no idea at all how to find that out for a Windows box though… Apparently, it has a different opinion of what chr 0xF3 means than the one defined in ISO-8859-1.
Makeshifts last the longest.
In reply to Re: Character Conversion Conundrum
by Aristotle
in thread Character Conversion Conundrum
by SheridanCat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |