--- a/branches/0.71/lib/SOAP/Transport/HTTP.pm
+++ b/branches/0.71/lib/SOAP/Transport/HTTP.pm
@@ -4,7 +4,7 @@
 # SOAP::Lite is free software; you can redistribute it
 # and/or modify it under the same terms as Perl itself.
 #
-# $Id: HTTP.pm 401 2012-03-10 17:18:32Z kutterma $
+# $Id: HTTP.pm 403 2012-03-10 17:26:36Z kutterma $
 #
 # ======================================================================
 
@@ -202,7 +202,7 @@
             }
             else {
                 require Encode;
-                $envelope = Encode::encode('UTF-8', $envelope);
+                $envelope = Encode::encode($encoding, $envelope);
             }
             #  if !$SOAP::Constants::DO_NOT_USE_LWP_LENGTH_HACK
             #      && length($envelope) != $bytelength;