First UTF-8 is perfectly capable of handling £, it's just that it encodes it differently from your original encoding, which you did not specify BTW.
Did you search the XML::Simple docs for 'encoding'? The second set of hits gives you a possible solution:
OutputFile => <file specifier> # out - handy The default behaviour of "XMLout()" is to return the XML as a s +tring. If you wish to write the XML to a file, simply supply the filen +ame using the 'OutputFile' option. This option also accepts an IO handle object - especially usefu +l in Perl 5.8.0 and later for writing out in an encoding other than +UTF-8, eg: open my $fh, '>:encoding(iso-8859-1)', $path or die "open($pa +th): $!"; XMLout($ref, OutputFile => $fh);
Other alternatives include post-processing the output file with iconv, Text::Iconv or using Encode if you are running perl 5.8.*
In reply to Re: Problem reading £ sign with XML::Simple
by mirod
in thread Problem reading £ sign with XML::Simple
by gothic_mallard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |