Forum

Thread tagged as: Blog, CKEditor

Text displaying with funny characters

Hi, the blog posts on my clients website appear with funny characters in them - https://www.medicaltherapieslondon.co.uk/blog/post.php?s=2015-05-31-why-do-patients-often-get-firm-and-fibrotic-tissues-after-a-surgical-procedure

I had thought this was due to my charset, but the charset of the database is UTF-8 Unicode and the charset is declared as utf-8 on my body tag.

Is there somewhere else I need to declare within perch? Any ideas?

Glenn

Glenn Drain

Glenn Drain 0 points

  • 6 years ago

Hello Glenn,

You would declare it in your <head>...</head> tag:

    <head>
        <meta charset=utf-8>
        <title><?php perch_pages_title(); ?></title>
        <link rel="stylesheet" href="css/styles.css" /> 
    </head>

Sounds like you have it on your body and not your head.

Sorry John, my mistake, I have got it declared in the head...

<head>
<meta http-equiv="Content-Type" content="text/html; charset="UTF-8" />
</head>

I'm seeing a semicolon ending content="text/html;. Does ending that with double quotes help: content="text/html"

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you take a look in your browser, you can see that page isn't being served as UTF-8 so that is the issue. If (in Firefox for example) you change the encoding to unicode the strange characters disappear.

There are more suggestions here as to how to ensure your pages as being served as UTF-8 https://stackoverflow.com/questions/15313623/unicode-not-displaying-correctly-in-my-page

Thanks for the help. The double quotes sorted it out.