The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

utf danish letters in contact form (2 posts)

  1. timduncan
    Posted 4 years ago #

    Hi all,

    I made this contact form and now then I tested I receive these symbols instead of danish letters.

    Comment: æ ø å øæøå

    I made the following changes:

    in wp-config:
    define('DB_COLLATE', 'utf8_general_ci');

    in header.php:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    and in the form:
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
    $headers = 'From: Page <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email;

    any ideas how to make it work?
    I am receiving the email in outlook.

    thanks in advance.

  2. timduncan
    Posted 4 years ago #

    in case someone has same problem, I changed this in my send.php or php code:

    $body .= "*Name: " . htmlentities($name, ENT_QUOTES, 'UTF-8') . "\n\n";

    the UFT-8 makes the magic.

Topic Closed

This topic has been closed to new replies.

About this Topic