Question

I'm completely stumped on this. My webpage has several pages, and on approximately half the punctuation won't display properly. For example on http://www.specialisttravelpeople.com/vietnam the punctuation appears as

"Highlights: ✓ Cyclo Hanoi Tour ✓ Overnight Cruise in Halong Bay ✓ Homestay in the Vietnam countryside ✓ Relax on Hoi An Beach ✓ Visit the iconic Meekong Delta"

Where as it should appear as

"Highlights: ✓ Cyclo Hanoi Tour ✓ Overnight Cruise in Halong Bay ✓ Homestay in the Vietnam countryside ✓ Relax on Hoi An Beach ✓ Visit the iconic Meekong Delta"

(which is does on another page http://www.specialisttravelpeople.com/tripstyles/family.php)

it can't be a problem with the font as it works fine in some pages. The font is defined in a header that every page uses anyway, and all other settings are the same (size, font weight etc etc).

Does anyone have any ideas what may cause this?

Was it helpful?

Solution

This is not a font issue but a matter of character encoding mismatch. The page is in fact UTF-8 encoded, which is fine, but the encoding is not declared anywhere—not in HTTP headers, not by using Byte Order Mark, not in a meta tag. This forces browsers to guess, and they often guess wrong.

The fix is to declare the encoding in some way. The simplest (but not the most robust) way is to add the following right after the <head> tag:

<meta charset=utf-8>

You do have font problems, but that’s a different issue: the font size is far too small, and the characters appear as more or less broken, because the font used just does not work in very small sizes. But this is completely different from the encoding problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top