I've been having problems with wordpress and the default UTF-8 encoding for ages but kinda brushed it under the carpet or changed to US-ASCII in wordpress admin and got away with it but when it's set to UTF-8 and I try to put in any kind of symbol like a " or ' it cuts off the content at the symbol.

Only seems to happen on certain wordpress installations or hosts though. Very weird??

  • Is there an override on the meta Content-Type of the theme? What is your browser default encoding? Do you have a development site we can view the issue on? neatlysliced over 9 years ago
  • You want to post a link to the site so I can review the headers it is creating? It could just be as simple as a meta tag declaring ISO-8859-1 Gary Hepting over 9 years ago

2 answers

danwellman 5600
1
point

I had a very similar problem with a blogger template recently and fixed it by adding this to the page:

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

Do you use dreamweaver? I think the default encoding with dreamweaver is:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 

which was causing the problem...

Answered over 9 years ago by danwellman
0
points

Yes - this is one of the things you're looking for:

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

This tells the browser what charset the rest of the source is written in. Other reasons might be:

  1. Hosting does not support UTF-8 SQL (not possible but might not be selected as a default when creating the databse)
  2. The installed version of wordpress might not be converted to UTF-8 (there are programs for converting ASCII to UTF)
Answered over 9 years ago by Stanimir Genov