This is an excerpt from the MT code.

sub mt_new {
     my $cfg = $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} >= 2 ?
         Apache2::RequestUtil->request()->dir_config('MTConfig') :
         $ENV{MOD_PERL} ?
         Apache->request->dir_config('MTConfig') :
         $MT::XMLRPCServer::MT_DIR . '/mt.cfg';
     my $mt = MT->new( Config => $cfg )
         or die MT::XMLRPCServer::_fault(MT->errstr);
     #$main::server->serializer->encoding($mt->config('PublishCharset'));
     # we need to be UTF-8 here no matter which PublishCharset
     $main::server->serializer->encoding('UTF-8');
     $mt;
}

In the second to last line, the $main::server breaks it (the variable isn’t initialised). I can see how the CGI script would initialise $::server, but the mod_perl handler?! Are there any other means I can access this “server” thingy from within MP?

Please make sure to tell me when you have any thoughts on the matter!

diff -wbiBprU5 MT-3.33/lib/MT/XMLRPCServer.pm /usr/lib/mt/lib/MT/XMLRPCServer.pm
--- MT-3.33/lib/MT/XMLRPCServer.pm      2006-07-20 10:44:06.000000000 +0200
+++ /usr/lib/mt/lib/MT/XMLRPCServer.pm    2006-10-04 23:51:41.000000000 +0200
@@ -9,18 +9,20 @@ use strict;
 use Time::Local qw( timegm );
 use MT::Util qw( offset_time_list );
 use MT::I18N qw( encode_text first_n_text const );
 
 sub mt_new {
-    my $cfg = $ENV{MOD_PERL} ?
+    my $cfg = $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} >= 2 ?
+       Apache2::RequestUtil->request()->dir_config('MTConfig') :
+       $ENV{MOD_PERL} ?
         Apache->request->dir_config('MTConfig') :
         $MT::XMLRPCServer::MT_DIR . '/mt.cfg';
     my $mt = MT->new( Config => $cfg )
         or die MT::XMLRPCServer::_fault(MT->errstr);
     #$main::server->serializer->encoding($mt->config('PublishCharset'));
     # we need to be UTF-8 here no matter which PublishCharset
-    $main::server->serializer->encoding('UTF-8');
+    #$main::server->serializer->encoding('UTF-8');
     $mt;
 }
 
 # TBD: Refactor me!
 sub iso2ts {