From 43b6f4a4dcdd5bc740c15f4d0550086376e79f33 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 29 Apr 2008 03:04:31 +0000 Subject: Bug 426899: Hack SOAP::Lite to encode upper-ASCII characters correctly for the WebService. Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/WebService.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Bugzilla/WebService.pm') 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__ -- cgit v1.2.3-24-g4f1b