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.
| You see | Should be | Likely 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 letter | Bytes are invalid in the encoding used, or a file was saved in a legacy encoding and read as UTF-8 |
| ???? | non-Latin text | Database 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.
- Landing pageHeadline shows é and ’
- TrustVisitor doubts the site is professional
- FormNever started
- Lead in CRMNever created
A wrong encoding on the landing page undermines trust before the visitor reaches the form.
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.
- 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.
curl -sI https://example.com/ | grep -i content-type
# Good: content-type: text/html; charset=UTF-8How to fix it
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.
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.
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.
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.
Align the database
Use utf8mb4 for the connection, database and tables. Back up first.
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.
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.
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.
Look for plugins and exports
If only imported content is garbled, re-import the file saved as UTF-8 (for example a CSV).
Shopify serves UTF-8
Shopify themes already send UTF-8, so check your theme.liquid still has <meta charset="utf-8"> in the head.
Fix imported data
If product titles are garbled after a CSV import, re-save the CSV as UTF-8 in your spreadsheet tool and import again.
Check apps and email templates
Disable recently added apps one at a time to find any that rewrite text.
Check custom HTML tags
Text injected by a Custom HTML tag or variable is read as UTF-8 by the page. Retype pasted accented characters if they came from a legacy editor, or use HTML entities such as é.
Check data sent to platforms
Use Preview mode to see event parameters. Garbled values come from the page or data layer, so fix the source.
Check custom code
Webflow outputs UTF-8. In Project Settings, Custom Code, make sure no pasted snippet sets another charset.
Check CMS imports
If CMS items are garbled after a CSV import, re-save the file as UTF-8 and re-import.
Check custom code blocks
Look in the page's custom code and tracking code areas for a <meta charset> pointing to another encoding and remove it.
Check imported contacts
If contact names are garbled, re-save your CSV as UTF-8 and import it again.
Check embedded code
Wix serves UTF-8. Garbled text usually comes from pasted text or an embed. Retype the text directly in the editor.
Check connected data
If a CMS collection was imported, re-import a UTF-8 CSV.
Retype pasted text
Squarespace serves UTF-8. Replace garbled text in the block editor by typing it again.
Check code injection
Under Settings, Developer Tools, Code Injection, remove any snippet that sets a different charset.
Set the header on the server
Use the snippets below for Apache, nginx or PHP.
Set the database connection charset
For MySQL, run SET NAMES utf8mb4 or set charset=utf8mb4 in the connection string.
<head>
<meta charset="utf-8">
<title>Café Müller</title>
</head>AddDefaultCharset UTF-8charset utf-8;<?php
header('Content-Type: text/html; charset=UTF-8');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é
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
- 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
- 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.
Related issues
- PRF-363Name fields reject accents, apostrophes or non-Latin scriptsFix guide
- PRF-352Mixed languages on one page (untranslated strings)Fix guide
- PRF-353Untranslated form labels/errors on translated pageFix guide
- PRF-354Untranslated checkout or emailsFix guide
- PRF-364RTL languages render left-to-right / layout brokenFix guide
- PRF-357Prices shown with wrong decimal/thousand separatorsFix guide