Skip to Content.
Sympa Menu

en - [sympa-users] problems with soap interface (probably all utf8 related)

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: "Goltz, Immo [Extern]" <address@concealed>
  • To: "'address@concealed'" <address@concealed>
  • Subject: [sympa-users] problems with soap interface (probably all utf8 related)
  • Date: Mon, 11 Aug 2014 12:03:15 +0000

Hello sympa users,

 

latest sympa release (6.1.22) has some soap/utf-8 related fixes.

But still there is a case where double encoding occures. In my case, the welcome / leave messages are double (?) encoded if user is subscribed/unsubscribed via soap.

Base system is CentOS 6.5 / 64 bit. soap::lite, mime:: and other packages via cpan, all other perl from centos or epel/rpmforge. MySQl as DB.

sympa is now version 6.1.22

 

1. Creation of a list with UTF8 characters inside subject and info

* Using Web-GUI

  -> correctly encoded in DB and in the 2 files (config, info)

  -> correct view in Web-GUI

 

2.  Adding a user with uf8 comment_subscriber  to a list

* Using Web-GUI

  -> (add user first, then edit user) correctly encoded in DB

  -> correct view in Web-GUI

  -> welcome mail correctly encoded

2a. remove user using Web-GUI

  -> leave mail correctly encoded

But if

2b. remove user using soap

  -> leave mail _not_ correctly encoded

The german text parts should be für / können but are "für Ihre Adresse erhalten haben. Sie können erneut abonnieren:"

 

And if

2.  Adding a user with uf8 comment_subscriber  to a list

* Using soap

  -> correctly encoded in DB

  -> correct view in Web-GUI

  -> welcome mail _not_ correctly encoded (and content repeats 3 times)

2a. remove user using Web-GUI

  -> leave mail correctly encoded

2b. remove user using soap

  -> leave mail _not_ correctly encoded

 

I had a look at the involved sympa modules but could not find that there is possible miscoded data passed to the send function.

This happens in mail.pm, in sub reformat_message. It has something to do with MIME::Parser here: $msg = $parser->parse_data($message);

But as far as i could debug, the function is called with identical values from soap and from web. So why is ist broken via soap?

 

Maybe is missed some important step in configuring sympa, or how a list with UTF-8 data has to be configured.

However, the following  patch solves the problem as far as i could test. With it, adding/removing a subscriber from Web-GUI and soap sends correctly encoded welcome/leave message.

 

*** mail.pm.org22         2014-08-11 13:06:57.000000000 +0200

--- mail.pm        2014-08-11 13:55:58.078890929 +0200

*************** sub reformat_message($;$$) {

*** 1018,1023 ****

--- 1018,1032 ----

                $msg = $message;

      } else {

                eval {

+                 # 20131122 Immo Goltz

+                 # the function $msg = $parser->parse_data($message);

+                 # produces different outputs from same(?) input files

+                 # if function triggered by

+                 #  - web and mail interface => ok

+                 #  - sympa-soap => wrong encoding

+                 # Howerver, $message output saved in file is always correct.

+                 # next line fixed this problem

+                 $message = &Encode::decode('UTF8', $message);

                    $msg = $parser->parse_data($message);

                };

                if ($@) {

 

 

Any help is appreciated

Thank you in advance

 

Immo Goltz

 

 



  • [sympa-users] problems with soap interface (probably all utf8 related), Goltz, Immo [Extern], 08/11/2014

Archive powered by MHonArc 2.6.19+.

Top of Page