Subject: | Patch for character codes > 0x1f |
Date: | Tue, 12 Sep 2006 18:22:54 +0200 |
To: | bug-WDDX [...] rt.cpan.org |
From: | Bernhard Weisshuhn <bkw [...] weisshuhn.de> |
Hi,
I fail to understand the reasoning behind char_decode() from
WDDX::String complaining about character codes > x1f.
In fact, this breaks compatibilty with php's wddx implementation, which
does create such character codes.
So, in the spirit of 'be liberal what you accept', please consider the
trivial patch below.
regards,
Bernhard Weisshuhn
--- WDDX-1.02/WDDX/String.pm.orig
+++ WDDX-1.02/WDDX/String.pm
@@ -167,7 +167,7 @@
sub char_decode {
my( $self, $code ) = @_;
- die "Invalid character code\n" unless $code =~ /^[01][0-9a-f]$/i;
+ die "Invalid character code\n" unless $code =~ /^[0-9a-f]{2}$/i;
return chr hex $code;
}