Index: lang/perl/Moxy/branches/CC/lib/Moxy/Util.pm
===================================================================
--- lang/perl/Moxy/branches/CC/lib/Moxy/Util.pm (revision 3964)
+++ lang/perl/Moxy/branches/CC/lib/Moxy/Util.pm (revision 9664)
@@ -23,5 +23,5 @@
 
 sub detect_charset {
-    my ($class, $response, $body) = @_;
+    my ($class, $response) = @_;
 
     my $charset;
@@ -29,7 +29,7 @@
         $charset = $1;
     }
-    $charset ||= ( $body =~ /<\?xml version="1.0" encoding="([\w\-]+)"\?>/ )[0]; 
-    $charset ||= ( $body =~ m!<meta http-equiv="Content-Type" content=".*charset=([\w\-]+)"!i )[0]; 
-    $charset ||= $Detector->($body); 
+    $charset ||= ( $response->content() =~ /<\?xml version="1.0" encoding="([\w\-]+)"\?>/ )[0]; 
+    $charset ||= ( $response->content() =~ m!<meta http-equiv="Content-Type" content=".*charset=([\w\-]+)"!i )[0]; 
+    $charset ||= $Detector->($response->content()); 
     $charset ||= 'utf-8'; 
 
