WordPress.org

Ready to get started?Download WordPress

Forums

utf danish letters in contact form (2 posts)

  1. timduncan
    Member
    Posted 2 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
    Member
    Posted 2 years ago #

    solved!
    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