You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Craig Cudmore <cr...@cudmore.ca> on 2018/01/18 17:59:18 UTC

Accented characters in a notice

Some of the notice messages i need to generate in Bounce mailet need to contain accented characters (messages need to be multilingual for our users).

Anyone know what the proper format is for including accented characters in a notice parameter in mailetcontainer.xml? I’ve tried 
é
&#224;
&#xE0;

and none of these result in the proper accented character in the generated message.

Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Accented characters in a notice

Posted by Craig Cudmore <cr...@cudmore.ca>.
I took the sample mailet (attached below) for attachments and tried to add accented characters to the default notice.

The resulting message does not format the accents properly. They show us as question marks in the email.

I’m trying to figure out if there is a way to get these accents into the message.


       <mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.doc *.docx *.cmd *.pif *.scr *.txt *.vbs *.avi *.mp3 *.mpeg *.shs" class="Bounce" onMatchException="error">
          <inline>heads</inline>
          <attachment>none</attachment>
          <passThrough>false</passThrough>
          <prefix>[REJECTED]</prefix>
          <notice>
The Security Policy of XXX does not allow to forward messages containing attachments having any of the extensions .exe, .com, .bat, .doc, .docx, .cmd, .pif, .scr, .vbs, .avi, .mp3, .mpeg, .shs, therefore your message has been rejected.

Please don't reply to this e-mail as it has been automatically sent by the antivirus system.

Regards, Postmaster XXX.YYY
.....................................
        This is é
        This is &#233;
&#224;
&#xE0;
          </notice>
       </mailet>

> On Jan 22, 2018, at 3:12 AM, Matthieu Baechler <ma...@apache.org> wrote:
> 
> Hi Craig,
> 
> The first thing is : it's xml, so you need to use legal xml for your
> text. AFAIK, the 3 solutions are correct.
> 
> The second thing is : the message is generated without taking too much
> care about the email encoding. I suspect that if you receive a mail
> that is not UTF-8, the appended notice won't be correctly encoded.
> 
> Would you mind attaching your mailetcontainer.xml and a bounced message
> with the problem you described ?
> 
> Cheers,
> 
> -- 
> Matthieu Baechler
> 
> On Thu, 2018-01-18 at 12:59 -0500, Craig Cudmore wrote:
>> Some of the notice messages i need to generate in Bounce mailet need
>> to contain accented characters (messages need to be multilingual for
>> our users).
>> 
>> Anyone know what the proper format is for including accented
>> characters in a notice parameter in mailetcontainer.xml? I’ve tried 
>> é
>> &#224;
>> &#xE0;
>> 
>> and none of these result in the proper accented character in the
>> generated message.
>> 
>> Thanks.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Accented characters in a notice

Posted by Matthieu Baechler <ma...@apache.org>.
Hi Craig,

The first thing is : it's xml, so you need to use legal xml for your
text. AFAIK, the 3 solutions are correct.

The second thing is : the message is generated without taking too much
care about the email encoding. I suspect that if you receive a mail
that is not UTF-8, the appended notice won't be correctly encoded.

Would you mind attaching your mailetcontainer.xml and a bounced message
with the problem you described ?

Cheers,

-- 
Matthieu Baechler

On Thu, 2018-01-18 at 12:59 -0500, Craig Cudmore wrote:
> Some of the notice messages i need to generate in Bounce mailet need
> to contain accented characters (messages need to be multilingual for
> our users).
> 
> Anyone know what the proper format is for including accented
> characters in a notice parameter in mailetcontainer.xml? I’ve tried 
> é
> &#224;
> &#xE0;
> 
> and none of these result in the proper accented character in the
> generated message.
> 
> Thanks.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org