Subject: | Non 7-bit-ASCII charcters are not working |
Date: | Wed, 6 Feb 2013 15:00:19 +0000 |
To: | "bug-WebService-Autotask [...] rt.cpan.org" <bug-WebService-Autotask [...] rt.cpan.org> |
From: | "Steinborn, Markus | Fachin & Friedrich" <m.steinborn [...] fachin-friedrich.de> |
Hi,
We are using WebService-Autotask version 1.003 on CentOS 5.9, which is shipped with perl 5.8. Nearly all is working well, but Entities with non 7-bit ASCII characters (like 'ä', 'ö', 'ü' and 'ß', but also 'é' and likewise) are causing problems. We can not create or update an entity containing such characters.
The most simple demonstration ist o create an account by hand containing such character and trying to update it (if you prefer without making any change) like done in the following script:
#!/usr/bin/perl
use WebService::Autotask;
use Data::Dumper;
$at = WebService::Autotask->new({
username => 'xxxxxxxxxxxxxxx',
password => 'xxxxxxxxxx'
});
# This search gives me exactly one account:
my $tmp = $at->query({
entity => 'Account',
query => [
{
name => 'Adressnummer',
udf => 1,
expressions => [{op => 'Equals', value => 10554 }]
},
]
});
# The above command is working and returning the non 7-bit-character apprently in LATIN1-Encoding.
# print Dumper($tmp); # I've checked it, looks ok
# Just to make shure we got an account
die unless $tmp;
# Update it
$at->update($tmp);
print $at->{error};
# prints out:
#
# ATWSError: Conversion from type 'Byte()' to type 'String' is not valid.
# ATWSError: Error updating entity for record number [1].
# The problem is that $tmp->["AccountName"} contains at leat one non 7-bit ASCII
# character ("ä" in this case).
We got the same error message if we try to insert such an entity. Neither creating nor updating is successfull if at least one non-7-bit-character is used. Because updating such an ntity without making any change also does not work, we believe that WebService-Autotask has a bug. Any help is appreciated.
Yours faithfully
Markus Steinborn