From: mkanat%bugzilla.org <> Date: Tue, 29 Apr 2008 03:04:31 +0000 (+0000) Subject: Bug 426899: Hack SOAP::Lite to encode upper-ASCII characters correctly for the WebSer... X-Git-Tag: bugzilla-3.1.4~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43b6f4a4dcdd5bc740c15f4d0550086376e79f33;p=thirdparty%2Fbugzilla.git Bug 426899: Hack SOAP::Lite to encode upper-ASCII characters correctly for the WebService. Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- diff --git a/Bugzilla/WebService.pm b/Bugzilla/WebService.pm index a2313803d5..94dbb62177 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__