user-pic

how to change system email encoding

Vote 0 Votes

Hi,

I wonder whether it’s possible to change the encoding of the emails, sent by MT (comment notification etc.).

Standard email encoding seems to be ISO-8859-1, which corrupts all non-Latin symbols, making the texts look like this: ???????? . What I need is Unicode UTF-8.

That’s strange a bit because all html pages are generated in utf-8.

Thank you! sash

Reported on Movable Type 4.2

9 Replies

| Add a Reply
  • Rob, than you!

    I've changed that, but it keeps sending in ISO-8859-1. I've noticed quite a mess with encoding in the templates... it could be ISO-8859-1, then utf-8 etc...

  • Hi Rob,

    Does it look right:

    MailTransfer sendmail
    Content-Type: text/plain; charset=UTF-8

    There must be something wrong here... somewhere... Emails are still in ISO-8859-1.

    sash

  • I think MailEncoding UTF-8 in mt-config.cgi should work. To be honest it is not something I have needed to do.

  • Rob,

    Thank you a lot!

    It's not working at the moment; having checked my DB charset, I think it's related to some template setting...

    Thank you once again!
    Sash

  • Hi,

    I'd like to rase this issue once again: notwithstanding what I do, MT sends all its email notifications in ISO-8859-1.

    How can I change the email notification encoding in utf-8 ?

    I'm sure I'm not the only one with this issue.

    Thanks,
    sash

  • Hi,

    I'd like to raise this issue once again: notwithstanding what I do, MT sends all its email notifications in ISO-8859-1.

    How can I change the email notification encoding in utf-8 ?

    I'm sure I'm not the only one with this issue.

    Thanks,
    sash

  • I have the same problem.

    There is evidently an error in documentation, since adding Content-Type: text/plain; charset=UTF-8 just does nothing.

    The Japanese MT website gives the correct directive for the Japanese language:
    MailEncoding ISO-2022-JP

    I've tried this directive and it works - the encoding of notification emails changes from ISO-8859-1 to ISO-2022-JP.

    But when I try to use UTF-8 or KOI8-R or Windows-1251 or ISO-8859-5 the comments just won't go through. With any of these encodings in mt-config the following error appears when I click the Submit button:
    Wide character in subroutine entry

    Any ideas how to correct this?

  • I've found the solution for this problem on a Japanese website.

    You'll need to edit the EncWords.pm file, found in \extlib\MIME

    Find the following line (~176):
    encode_base64($str, '');

    Replace it with:
    encode_base64(encode_utf8($str), '');

    Above it, add the following line:
    use Encode qw(encode_utf8);

    (I've added this immediately after the comment "# Private: used by encode_mimeword() to encode "B" encoding" two lines above)

    Now you can add
    MailEncoding UTF-8
    in your mt-config.cgi

    Hope, the Japanese development team is aware of this issue and will fix it in a new release.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012