#!/usr/bin/perl use strict; use utf8; # A simple test to show the UTF8 problem my $parameters; push (@{ $parameters->{Request} }, { URI => '/HRM/EmploymentManager/AvailableOpenings', Action => 'GET', ID => '123', Parameters => { Status => 'Test', }, }); # convert Perl hash ref into XML my $xs = XML::Simple->new(); my $x = $xs->XMLout($parameters, KeepRoot => 0, RootName => 'Requests',XMLDecl => qq{}); print $x; # convert XML into Perl hash ref my $xs = XML::Simple->new(); my $XML = $xs->XMLin($x,ForceArray => 0); # Look at the perl hash ref, there shouldnt be any my $temp = $XML->{'Request'}->{'Action'}; my $flag = utf8::is_utf8($temp); print "$flag ! $temp\n\n\n"; exit;