This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Email Character Encoding


  1. msfbiz
    Member

    How can I change the character encoding for the content of the emails that are sent after the form is submitted (From UTF-8 to ISO-8859-1)?

    I tried changing the code in email_entry.php to this:

    $esl_from_name 	= iconv("UTF-8", "ISO-8859-1", $row['esl_from_name']);
    		$esl_from_email_address = $row['esl_from_email_address'];
    		$esl_subject 	= iconv("UTF-8", "ISO-8859-1", $row['esl_subject']);
    		$esl_content 	= iconv("UTF-8", "ISO-8859-1", $row['esl_content']);
    		$esl_plain_text	= iconv("UTF-8", "ISO-8859-1", $row['esl_plain_text']);

    and this

    //content
    		if(!empty($esl_content)){
    			$admin_email_param['content'] = $esl_content;
    		}else{
    			$admin_email_param['content'] = = iconv("UTF-8", "ISO-8859-1", '{entry_data}');
    		}

    But to no avail.

    Thanks for your help,
    Mike

    Posted 13 years ago #
  2. msfbiz
    Member

    Is it possible to get support (or at least an answer) on this issue please?

    Thanks!
    Mike

    Posted 13 years ago #
  3. Plastic
    Pro Member

    I'm always surprised at how many users consider this forum as a tech support area. As with any forum it is intended as a discussion area where we all share thoughts, concerns, and ideas. If you want tech support it is probably faster to get it by using the "Support" link at the top of the page.

    Posted 13 years ago #
  4. yuniar

    All you need to do is to modify "includes/helper-functions.php" file, search around line 397:

    $mail->CharSet  = 'UTF-8';

    simply change it to become:

    $mail->CharSet  = 'ISO-8859-1';

    However, MachForm uses UTF-8 for all the data. So I'm not sure if that won't broke your email content. Is there any problem with UTF-8?


    MachForm Founder

    Posted 13 years ago #
  5. msfbiz
    Member

    @Plastic

    You bring up a good point and my understanding is that the forum is for support as well.

    I think the support link is mostly to report bugs or contact the programmers directly.

    Also when an issue is solved for someone on the forum, everybody can benefit from it without asking for the same support issue privately over and over again.

    @Yuniar

    1) Please, let me know if my understanding for using the forum for support is correct.

    2) The solution you provided works and you're right, the email content is broken since content is in UTF-8 and Charset is ISO-8859-1.

    I guess I could fix that by applying the iconv() function to the content, but I just realized my issue was due to the fact that I use Eudora as email client which doesn't understand UTF-8 natively.

    Luckily, I found a Plugin to resolve that. Here's the link for other Eudora users:

    http://windharp.de/software/utf8iso.htm

    Thanks!
    Mike

    Posted 13 years ago #

RSS feed for this topic

Reply