diff options
author | mkanat%bugzilla.org <> | 2008-04-29 05:04:31 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-04-29 05:04:31 +0200 |
commit | 43b6f4a4dcdd5bc740c15f4d0550086376e79f33 (patch) | |
tree | 6d95190754930e00110df85e7dc808b0e5e923e0 | |
parent | 6c34f604cbe796fabb144e5c666d4a569b93bfab (diff) | |
download | bugzilla-43b6f4a4dcdd5bc740c15f4d0550086376e79f33.tar.gz bugzilla-43b6f4a4dcdd5bc740c15f4d0550086376e79f33.tar.xz |
Bug 426899: Hack SOAP::Lite to encode upper-ASCII characters correctly for the WebService.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
-rwxr-xr-x | Bugzilla/WebService.pm | 10 |
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__ |