summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xBugzilla/WebService.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/WebService.pm b/Bugzilla/WebService.pm
index a2313803d..94dbb6217 100755
--- a/Bugzilla/WebService.pm
+++ b/Bugzilla/WebService.pm
@@ -112,6 +112,16 @@ sub new {
return $self;
}
+sub as_string {
+ my $self = shift;
+ my ($value) = @_;
+ # Something weird happens with XML::Parser when we have upper-ASCII
+ # characters encoded as UTF-8, and this fixes it.
+ utf8::encode($value) if utf8::is_utf8($value)
+ && $value =~ /^[\x00-\xff]+$/;
+ return $self->SUPER::as_string($value);
+}
+
1;
__END__