-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOAP API output without utf8 #1541
Comments
@acasadoual , could you please show actual inputs in UTF-8 encoding and actual outputs? " |
The inputs is a tt2 file. # cat /var/lib/sympa/list_data/lista4/mail_tt2/welcome.tt2
[%# welcome.tt2 ~%]
From: [% fromlist %]
Subject: [%"Welcome to list %1"|loc(list.name)|qencode%]
Esto es una prueba de acentos á é ñ í ó ú
[%|loc(list.name,domain)%]Welcome to list %1@%2[%END%]
[%|loc(user.email)%]Your subscription email is %1[%END%]
[% TRY %]
[% INSERT "info" %]
[% CATCH %]
[% END %]
[% IF conf.wwsympa_url -%]
[%|loc%]The list homepage:[%END%] [% 'info' | url_abs([list.name]) %]
[%|loc%]General information about mailing lists:[%END%] [% 'help' | url_abs(['introduction.html']) %]
[% END -%] |
With sympa 6.2.70 it fails too. |
Could you please be more specific about the steps to reproduce?
|
…ympa-community#1541) This commit also reverts a redundant fix done at 39ddf25 (sympa-community#1407)
…ympa-community#1541) This commit also reverts a redundant fix done at 39ddf25 (sympa-community#1407)
…ympa-community#1541) This commit also reverts a redundant fix done at 39ddf25 (sympa-community#1407)
…ympa-community#1541) Revert a redundant fix which has been done at 39ddf25 (sympa-community#1407)
Hi @acasadoual , The patch is against 6.2.72. As this patch is a bit complicated, if you feel difficulty to apply it, please let me know. |
How i can to applied this path in RPM installation? |
To confirm if patch can be applied correctly,
(when If no errors are shown, then apply patch actually:
(Also skip Note that, this patch is under review and it should not be applied to production service: It is strongly recommended to apply it to testing environment. |
That patch works ok. |
Good news. Thank you @acasadoual ! Does the patch also solve the problem reported on #1682 ? |
NO, only #1541 (this error) |
For #1682 Solution: In line 1528 of /usr/share/sympa/lib/Sympa/WWW/Soap.pm
|
No, these lines were erased by the patch you applied. Lines around 1528 are now as below:
|
It's true. Now, all commands of "sympa test soap" are in warning with utf8 character:
|
only "subject" field, the "info" field is ok |
What is true? The patch erased those lines?
What are "all commands"? Could you please show the all command lines you executed, and some examples of the actual results? |
All commands with subject results: Example complexWhich:
Example which:
Example complexLIsts:
Example lists:
|
@acasadoual , Note that, please do not copy and paste content of the file, but send it as a file attachment to the email. The email address is found here. |
I sent you the file. |
It turned out that the problem about "not map to utf8" is the bug in XML-Parser CPAN module: So we won't try to fix it anymore. |
…ympa-community#1541) Revert a redundant fix which has been done at 39ddf25 (sympa-community#1407)
Broken output with SOAP API due to mixture of byte- and utf8-strings (#1541)
When I subscribe a user with the SOAP API the email arrives with the wrong accents in ANSI. Example:
Esto es una prueba de acentos á é ñ à ó ú
Version
Sympa 6.2.68, CentOS 7.9, httpd-2.4, php-5.4
Installation method
rpm fedora-epel
Expected behavior
email with utf8 encoding
Actual behavior
email with ansi enconding
Steps to reproduce
subscribe a user with the SOAP API
Additional information
[root@alboran sympa]# grep -i utf8 /usr/libexec/sympa/wwsympa.fcgi
#XXXbinmode STDOUT, ":utf8";
#XXX## Incoming data is utf8-encoded
#XXXbinmode STDIN, ":utf8";
#XXX$in{$p} = Encode::decode('utf8', $in{$p});
return Encode::encode_utf8($s) if Encode::is_utf8($s);
Sympa::Tools::Text::guessed_to_utf8($fn,
Sympa::Tools::Text::guessed_to_utf8($path, @langs);
Sympa::Tools::Text::guessed_to_utf8($fn,
Encode::decode_utf8($in{'subject'}),
$message->reformat_utf8_message([], 'utf-8');
$message->reformat_utf8_message([], $charset);
[root@alboran sympa]# grep -i utf8 /usr/libexec/sympa/sympa_soap_server.fcgi
[root@alboran sympa]#
The text was updated successfully, but these errors were encountered: