Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Character encoding broken (é instead of é): how to fix it

PRF-366Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A character encoding is the rulebook that turns bytes into letters. UTF-8 is the modern standard and covers almost every language. Mojibake is the garbled text you get when one system writes text with one rulebook and another reads it with a different one.

The classic sign is é showing as é, ’ as ’, or ü as ü. Black diamonds with question marks (�) usually point to the same family of problem.

Common mojibake patterns and what they mean
You seeShould beLikely cause
ééUTF-8 text read as Windows-1252 or ISO-8859-1
’’ (curly apostrophe)UTF-8 read as Windows-1252
üüUTF-8 read as Windows-1252
�any accented letterBytes are invalid in the encoding used, or a file was saved in a legacy encoding and read as UTF-8
????non-Latin textDatabase or connection uses latin1, so characters were replaced on save

Why it costs you leads or sales

Garbled text makes a site look broken or unsafe. Visitors who see é in a product name, price note or button may doubt that the checkout is trustworthy. It hurts most in languages with many accents, such as French, German, Spanish, Polish and Turkish.

It can also damage the data you collect. If a form saves a name like José as José, your emails and CRM records look careless, and personalised messages go out with broken names. Garbled text in titles and descriptions can also show up in search results.

Where mojibake hurts the journey
  1. Landing pageHeadline shows é and ’
  2. TrustVisitor doubts the site is professional
  3. FormNever started
  4. Lead in CRMNever created

A wrong encoding on the landing page undermines trust before the visitor reaches the form.

Form starts with and without garbled textExample numbers
Form starts with and without garbled text (example)Clean text: 12 %; Garbled text: 8 %059128Clean textGarbled text%

Example: illustrative numbers only, showing how a trust drop could reduce the share of visitors who start a form.

How to check if your site has it

This is an easy visual check. Look at pages that contain accents, curly quotes, currency symbols or non-Latin scripts.

Quick checks
  • Open your translated pages and look for Ã, Â, †or � in headings, buttons and body text.
  • Check the page title in the browser tab and in a Google search result for your site.
  • Submit a test form with a name like José Müller and check the confirmation email and CRM record.
  • Check product names, prices (€, £) and emails sent by your shop or form tool.
  • Right-click the page, choose View page source, and look for <meta charset="utf-8"> near the top of <head>.
  • Open DevTools, go to the Network tab, click the page request, and read the Content-Type response header for charset=utf-8.
Check the charset your server sendsbash
curl -sI https://example.com/ | grep -i content-type
# Good: content-type: text/html; charset=UTF-8

How to fix it

Fix character encoding step by step
  1. Find where the break happens

    Work out whether the problem is in the page (HTML or headers), in the stored data (database), or in a feed or email. If new text looks fine but old text is garbled, the data is the problem. If everything is garbled, the declaration is wrong.

  2. Declare UTF-8 in the HTML

    Put <meta charset="utf-8"> as the first element inside <head>, within the first 1024 bytes of the file.

  3. Send UTF-8 in the server header

    Set the Content-Type header to text/html; charset=UTF-8. A header overrides the meta tag, so a wrong header causes mojibake even with correct HTML.

  4. Save files as UTF-8

    In your editor, save templates and scripts as UTF-8 without BOM. A BOM is an invisible marker at the start of a file that can cause stray characters or header errors in PHP.

  5. Align the database

    Use utf8mb4 for the connection, database and tables. Back up first.

  6. Repair already-garbled data

    Text saved wrongly needs converting, not just re-declaring. Restore from a clean backup or run a careful conversion on a copy first.

Fix by platform
  1. Check wp-config.php

    Make sure it contains define('DB_CHARSET', 'utf8mb4'); and that DB_COLLATE is empty or a utf8mb4 collation. Do not change DB_CHARSET on a live site with old latin1 data without a backup.

  2. Check the theme header

    In header.php, the theme should use <meta charset="<?php bloginfo( 'charset' ); ?>">. Under Settings in the dashboard, the site charset is UTF-8 by default.

  3. Look for plugins and exports

    If only imported content is garbled, re-import the file saved as UTF-8 (for example a CSV).

Declare UTF-8 first in the headhtml
<head>
  <meta charset="utf-8">
  <title>Café Müller</title>
</head>
Apache: default charsethtaccess
AddDefaultCharset UTF-8
nginx: default charsetnginx
charset utf-8;
PHP: send the headerphp
<?php
header('Content-Type: text/html; charset=UTF-8');
What changes

Broken

  • Headline reads Café Müller
  • Header says charset=ISO-8859-1
  • Form names saved as José

Fixed

  • Headline reads Café Müller
  • Header and meta tag both say UTF-8
  • Form names saved as José
Encoding mismatchInteractive
Page read as the wrong encoding

Mismatch

Leads or data lost

The visitor sees Café and ’ in headings and buttons, and trust drops.

Toggle the mismatch to see how one wrong setting changes what visitors read.

How to confirm it's fixed

Confirmation checks
  • Hard refresh the page (Ctrl+Shift+R or Cmd+Shift+R) and clear any cache or CDN.
  • Confirm the Content-Type header shows charset=UTF-8 with the curl command above.
  • Check a page with accents, curly quotes and a currency symbol in two browsers.
  • Submit a test form with José Müller and check the stored record and email.
  • Check the browser tab title and a search result snippet after Google recrawls.

How to prevent it happening again

Prevention habits
  • Use UTF-8 for everything: files, headers, database, connection and exports.
  • Use utf8mb4 for MySQL, not the older utf8 (which cannot store all characters, such as emoji).
  • Save CSV files as UTF-8 before importing them.
  • Paste into a plain-text field before pasting into the editor if text comes from Word or legacy tools.
  • After a migration, hosting change or plugin update, open a page with accents and check it.
  • Add a test page containing é, ü, ñ, ’, €, and a non-Latin word, and look at it after every release.

How FunnelGuard handles this

FunnelGuard does not check for broken character encoding today. It is a possible future check, since it is mostly an easy text check on pages the robot already loads.

What FunnelGuard does do is run your real customer journeys on a schedule, check each step, and confirm that test leads reach the inbox and CRM. If a broken page stops a form or button from working, that failure is re-checked from a second region and sent as one alert with a screenshot. Garbled text alone would not trigger it.

To watch for mojibake yourself, add a test page with accented characters to your release checklist, run the curl header check above after deployments, and submit a test lead with an accented name to see how it appears in your CRM. A free read-only website audit from FunnelGuard is also available.

Questions people ask

Why does my website show é instead of é?

Your text is saved as UTF-8 but the browser reads it as Windows-1252 or ISO-8859-1. Declare UTF-8 with <meta charset="utf-8"> and a Content-Type header of charset=UTF-8, then make sure the database also uses UTF-8.

How do I fix weird characters on my website?

First find whether the problem is in the page declaration or in stored data. Set UTF-8 in the HTML and server headers, save files as UTF-8, and use utf8mb4 in your database. Text already stored wrongly needs to be converted or restored from a backup.

What is mojibake?

Mojibake is garbled text caused by reading characters with the wrong encoding. A typical example is é turning into é. It is not a font problem, it is a mismatch between how text was saved and how it is read.

Why do I see black diamonds with question marks on my page?

The � symbol appears when a browser meets bytes that are not valid in the encoding it is using. It often means a file was saved in a legacy encoding but the page is read as UTF-8. Re-save the file as UTF-8 or fix the declared charset.

Why is my WordPress site showing garbled characters?

Common causes are a mismatch between DB_CHARSET in wp-config.php and the database tables, a wrong header from the server, or imported content that was not UTF-8. Check those, and always back up before changing the database charset.

Does the meta charset tag or the HTTP header win?

The HTTP Content-Type header takes priority over the meta tag. If your server sends ISO-8859-1 in the header, the page will be read that way even if the HTML says UTF-8. Fix the header first.

Should I use utf8 or utf8mb4 in MySQL?

Use utf8mb4. MySQL's older utf8 stores only up to three bytes per character and cannot hold all characters, such as emoji. utf8mb4 is full UTF-8.

Can I detect broken encoding automatically?

FunnelGuard does not check this yet. You can watch for it with a test page full of accented characters, a curl check of the Content-Type header after releases, and a test form submission with an accented name.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: language / country variants (Stage 27): locale_served: mojibake on variant runs.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.