views:

440

answers:

4

I am attempting to start a new Wordpress blog. I am seeing funny characters in some browsers but not others instead of single quotes, double quotes and ellipses. Things I already thought of:

  • The HTML template page for output itself is set to UTF-8
  • The admin page is UTF-8
  • The MySQL database tables where the data is stored are UTF-8 encoded
  • I am entering regular keyboard (')'s and (")'s (...)'s and not pasting in from another application.
  • I am using WordPress's out-of-the box WSYWIG

Browsers it looks wrong in (for example): Firefox for Windows, IE7 For Windows Browsers it looks okay in (for example): Firefox for OS X, Safari for OS X

Where do I go from here?

+1  A: 

It could be some problem with the used font. Perhaps the Windows font cannot display the used codepoints correctly (happens with some freeware fonts that just don't include the whole UTF-8 spectrum) while the OS X font has these codepoints included.

What font is used?

Can you check the page output when using Arial or sans-serif as the font-family in CSS?

Stefan Gehrig
G'damnit, this was indeed it. I actually came to answer my own old question. Damn microsoft Sans and your lack of em dash!
danieltalsky
A: 

It may be worth trying to view your blog through Browsershots. It's a free service that allows you to see your website in multiple operating systems and browsers. If the same issue appears on all of the Browsershot samples, then you know it's a WordPress issue. If it only shows up on a few, then it might be a per-machine/OS/browser issue.

Philip Morton
I know that it's only a few. I listed which ones in the original question.
danieltalsky
+2  A: 

Go to Firefox on Windows, use right-click "View Page Info" to see what Firefox is seeing.

Your situation is probably being caused by not setting correctly the page encoding somewhere along the line. You can basically setup your encodings in the HTTP headers and in the HTML head. HTTP headers are influenced by the web server and the PHP script. HTML head is written out by PHP.

Check out your HTML output and read carefully the W3C HTML standard on encodings to see which charset encoding is specifying your page. Also, check your PHP to see if it's sending an HTTP header specifying the encoding. Finally, check your web server (some people configure Apache's httpd to send a default encoding. That is evil).

According to your symptoms, my guess is that you are not sending any correct encoding information through HTML/HTTP and the rendering depends on the default rendering of the browser, thus the issues you are seeing.

alex
+1  A: 

There can sometimes be a problem with other files that get loaded, for example via JavaScript, that might have the charset not set to UTF8.

Arib