6.0.0-alpha12
6/15/25

[#9532] Ingo Big problem with MIME::encode and accentuated characters
Summary Ingo Big problem with MIME::encode and accentuated characters
Queue Ingo
Queue Version 1.2.5
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester gerard.breiner (at) ias (dot) u-psud (dot) fr
Created 01/22/2011 (5258 days ago)
Due
Updated 01/26/2015 (3793 days ago)
Assigned
Resolved 01/25/2011 (5255 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/26/2011 09:54:27 AM gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #8 Reply to this comment
Many thanks Michael for this efficient action.

Best regards

Gerard
I believe Gerard is correct.  According to 
http://www.courier-mta.org/maildrop/mailbot.html, the text 
autoresponse message (set by the -t flag) is a "plain text message"; 
its charset is specified by the charset flag (-c).
cd
Thus, no encoding should be done - I'm assuming that the maildrop 
scripts do it automatically if needed (e.g. using 
http://www.courier-mta.org/maildrop/makemime.html).
01/25/2011 05:53:59 PM Michael Slusarz Comment #7
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
I believe Gerard is correct.  According to 
http://www.courier-mta.org/maildrop/mailbot.html, the text 
autoresponse message (set by the -t flag) is a "plain text message"; 
its charset is specified by the charset flag (-c).
cd
Thus, no encoding should be done - I'm assuming that the maildrop 
scripts do it automatically if needed (e.g. using 
http://www.courier-mta.org/maildrop/makemime.html).
01/25/2011 05:50:46 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9532: Don't MIME encode maildrop autoresponse file

http://git.horde.org/horde-git/-/commit/2133d2b3f171e68af1114abfe4f3e1bab28d4461
01/25/2011 02:57:34 PM gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #4 Reply to this comment
Eventually, after reading RFC 2047 I must recognize that the normal 
result of :
  $reason = MIME::encode($params['action-value']['reason'], 
NLS::getCharset()); is :
"?utf-8?b?w6kg?= =?utf-8?b?w6gg?= =?utf-8?b?w6A=?= " as encoded-words 
for "é è ç" characters...
Nevertheless, it seems that MIME::encode is used for encoding the 
headers fields but the message himself (here it is "$reason"). Given I 
have not this problem with messages I send via IMP (accentuted 
characters ares correctly encoded) ,  I searched into 
imp/lib/Compose.php and noticed that messages are not encoded by 
MIME:encode.
Am I wrong ?

Best regards

Gerard

[Show Quoted Text - 24 lines]
01/22/2011 06:48:19 PM gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #3 Reply to this comment
This encoding is perfectly fine.
Hello Jan,

It would be perfectly fine if the message vacation sending by mailbot 
was not :
"?utf-8?b?w6kg?= =?utf-8?b?w6gg?= =?utf-8?b?w6A=?= " whereas the 
vacation message that has been created via the ingo's interface was : 
"é è ç".

However the encoding is perfectly fine with the below modification...
// Writing vacation.msg file
             //$reason = 
MIME::encode($params['action-value']['reason'], NLS::getCharset());
             $reason = $params['action-value']['reason'];

Nevertheless, your answer make me puzzle.... why the encoding would be 
perfectly fine for you and not for me if we have the same version ingo 
1.2.5 under horde 3.3.10 ?

Best regards

Gérard

01/22/2011 05:17:05 PM Jan Schneider Comment #2
State ⇒ Not A Bug
Priority ⇒ 1. Low
Reply to this comment
This encoding is perfectly fine.
01/22/2011 03:49:50 PM gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Ingo
Due ⇒ 01/22/2011
Summary ⇒ Ingo Big problem with MIME::encode and accentuated characters
Type ⇒ Bug
Priority ⇒ 3. High
Reply to this comment
This problem happens at the line 489 ingo/lib/Script/maildrop.php.
At this line the code is :
$reason = MIME::encode($params['action-value']['reason'], NLS::getCharset());

The effect of this code is that accentuated characters such as : é è ç 
becomes ?utf-8?b?w6kg?= =?utf-8?b?w6gg?= =?utf-8?b?w6A=?=

The solution (which works very fine) is to replace it by :

$reason = $params['action-value']['reason']);

What do you think about it ?

Thanks in advance....
Best regards...

Gérard Breiner


Saved Queries