[interchange-cvs] interchange - jon modified lib/Vend/CharSet.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Sep 26 15:44:15 UTC 2008
User: jon
Date: 2008-09-26 15:44:15 GMT
Modified: lib/Vend Tag: STABLE_5_6-branch CharSet.pm
Log:
Quell bogus warnings from Encode::Alias. Resolves RT #224.
Thanks to Andy <ic at tvcables.co.uk> and Rene Hertell <icdevgroup at hertell.com> for reporting.
Revision Changes Path
No revision
No revision
2.8.2.1 interchange/lib/Vend/CharSet.pm
rev 2.8.2.1, prev_rev 2.8
Index: CharSet.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/CharSet.pm,v
retrieving revision 2.8
retrieving revision 2.8.2.1
diff -u -u -r2.8 -r2.8.2.1
--- CharSet.pm 19 Apr 2008 14:37:27 -0000 2.8
+++ CharSet.pm 26 Sep 2008 15:44:15 -0000 2.8.2.1
@@ -1,6 +1,6 @@
# Vend::CharSet - utility methods for handling character encoding
#
-# $Id: CharSet.pm,v 2.8 2008-04-19 14:37:27 jon Exp $
+# $Id: CharSet.pm,v 2.8.2.1 2008-09-26 15:44:15 jon Exp $
#
# Copyright (C) 2008 Interchange Development Group
# Copyright (C) 2008 Sonny Cook <sonny at endpoint.com>
@@ -23,7 +23,6 @@
package Vend::CharSet;
use strict;
-use warnings;
use Encode qw( decode resolve_alias is_utf8 );
@@ -35,10 +34,8 @@
$octets =~ tr/+/ /;
$octets =~ s/%([0-9a-fA-F][0-9a-fA-F])/chr(hex $1)/ge;
- unless ($encoding || $class->validate_encoding($encoding)) {
- return $octets;
- }
-
+ return $octets unless $encoding and $class->validate_encoding($encoding);
+
my $string = $class->to_internal($encoding, $octets);
#::logDebug("decoded string: " . display_chars($string)) if $string;
More information about the interchange-cvs
mailing list