Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: cvs

interchange - jon modified lib/Vend/CharSet.pm

 

 

Interchange cvs RSS feed   Index | Next | Previous | View Threaded


interchange-cvs at icdevgroup

Apr 19, 2008, 7:37 AM

Post #1 of 1 (160 views)
Permalink
interchange - jon modified lib/Vend/CharSet.pm

User: jon
Date: 2008-04-19 14:37:27 GMT
Modified: lib/Vend CharSet.pm
Log:
Be more specific in logging for character set handling.

Revision Changes Path
2.8 interchange/lib/Vend/CharSet.pm


rev 2.8, prev_rev 2.7
Index: CharSet.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/CharSet.pm,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -u -r2.7 -r2.8
--- CharSet.pm 17 Apr 2008 22:50:33 -0000 2.7
+++ CharSet.pm 19 Apr 2008 14:37:27 -0000 2.8
@@ -1,6 +1,6 @@
# Vend::CharSet - utility methods for handling character encoding
#
-# $Id: CharSet.pm,v 2.7 2008-04-17 22:50:33 jon Exp $
+# $Id: CharSet.pm,v 2.8 2008-04-19 14:37:27 jon Exp $
#
# Copyright (C) 2008 Interchange Development Group
# Copyright (C) 2008 Sonny Cook <sonny[at]endpoint.com>
@@ -47,12 +47,13 @@

sub to_internal {
my ($class, $encoding, $octets) = @_;
-#::logDebug("to_internal - converting octets from $encoding to internal");
- if (!$encoding || is_utf8($octets)) {
-#::logDebug("to_internal - octets are already UTF-8 flagged");
- return $octets;
- }

+#::logDebug("to_internal - no encoding specified"),
+ return $octets unless $encoding;
+#::logDebug("to_internal - octets are already UTF-8 flagged"),
+ return $octets if is_utf8($octets);
+
+#::logDebug("to_internal - converting octets from $encoding to internal");
my $string = eval { decode($encoding, $octets, Encode::FB_CROAK) };
if ($@) {
::logError("Unable to properly decode <%s> with encoding %s: %s", display_chars($octets), $encoding, $@);
@@ -83,7 +84,7 @@

$compartment->untrap(qw/require caller dofile sort entereval/);
$compartment->reval('$_ = "\x{30AE}"; s/[abc]/x/ig');
- $@ and ::logError("Part of UTF-8 safe regex workaround failed (this may not be a bug): %s", $@);
+ $@ and ::logError("Part of UTF-8 safe regex workaround failed (this may not be a problem): %s", $@);
$compartment->trap(qw/require caller dofile sort entereval/);

# check and see if it worked, if not, then we might have problems later





_______________________________________________
interchange-cvs mailing list
interchange-cvs[at]icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs

Interchange cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.