tags:

views:

327

answers:

2

Hi all!

I am trying to make a Facebook share button on my site. Everything goes well except Facebook garbles non-ascii symbols obtained from meta tags. For example:

I am sharing a page with URL http://example.com/facebook/. The page at http://example.com/facebook/ has the following meta tags inside its HTML:

<head>
...
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
...
<meta name="title" content="John Smith won £10000!" />
<meta name="description" content="Wanna be next John Smith?" />
<link rel="image_src" href="http://example.com/img/logo.jpg" />
...
</head>

The problem is that a pound (£) sign is shown as � symbol in Facebook share pop-in, that's not a desired behaviour.

I would be grateful for any thoughts.

+1  A: 

I would recommend replacing the pound-sign with the equivalent entity, i.e. &#163; = £. You may also need to add a charset definition, e.g. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> In fact, you might be able to get away with just the meta tag -- just put it before the others.

Arthur Shipkowski
+1 for UTF-8...
Sixten Otto
Thanks for advice. As you can see, a meta tag that sets utf-8 charset, is the first meta tag in <head> section.Have tried replacing £ with £ and £ - unfortunately, this did not help.
Serge Tarkovski
A: 

I have the same problem here? So what can we do?

receptite
Please only post an answer when you are able to offer some constructive help.
Jeriko

related questions