in reply to Character Conversion Conundrum
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Character Conversion Conundrum
by Joost (Canon) on Dec 22, 2004 at 22:38 UTC | |
by Aristotle (Chancellor) on Dec 22, 2004 at 22:46 UTC | |
by Joost (Canon) on Dec 22, 2004 at 22:59 UTC | |
by Aristotle (Chancellor) on Dec 22, 2004 at 23:17 UTC | |
by Joost (Canon) on Dec 22, 2004 at 23:28 UTC | |
| |
|
Re^2: Character Conversion Conundrum
by SheridanCat (Pilgrim) on Dec 23, 2004 at 17:28 UTC | |
by Aristotle (Chancellor) on Dec 23, 2004 at 19:17 UTC | |
by SheridanCat (Pilgrim) on Dec 28, 2004 at 20:01 UTC |