[Rt-commit] [svn] r1911 - in rt/branches/3.3-TESTING: . html
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Wed Nov 17 06:28:48 EST 2004
Author: autrijus
Date: Wed Nov 17 06:28:47 2004
New Revision: 1911
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/html/autohandler
Log:
r4462 at not: autrijus | 2004-11-17T11:21:48.719799Z
* under MasonX::Apache2Handler, empty arguments sometimes got
passed in as unicode strings, so Encode::decode('utf8')
fails miserably. We now explicitly check is_utf8() before
applying a decode; this is a better style anyway.
Modified: rt/branches/3.3-TESTING/html/autohandler
==============================================================================
--- rt/branches/3.3-TESTING/html/autohandler (original)
+++ rt/branches/3.3-TESTING/html/autohandler Wed Nov 17 06:28:47 2004
@@ -61,11 +61,11 @@
# passed just one, a scalar whatever they are, mark them as utf8
my $type = ref($_);
(!$type)
- ? Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
+ ? Encode::is_utf8($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
($type eq 'ARRAY')
- ? [ map { ref($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
+ ? [ map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } @$_ ] :
($type eq 'HASH')
- ? { map { ref($_) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
+ ? { map { (ref($_) or Encode::is_utf8($_)) ? $_ : Encode::decode(utf8 => $_, Encode::FB_PERLQQ) } %$_ } : $_
} %ARGS;
$m->{'rt_base_time'} = [Time::HiRes::gettimeofday()];
More information about the Rt-commit
mailing list