Topic-icon Encoding issue in Facebook

Active Subscriptions:

None
10 years 7 months ago - 10 years 7 months ago #36871 by dmtalvdal
I am having a issue with sharing a article on Facebook. It seems that the encoding is not correct, even when I have set UTF8 on page. The title are not being viewed correctly on Facebook when sharing a item. See enclosed image.

I am using Joomla 3.1.5 with JFBConnect 5.1.1
File Attachment:


It seems that the meta property is not correct for "og:title"

<meta property="og:title" content="DMT Alvdal s&#xc3;&#xb8;ker frontend-utvikler og webutvikler" />

After checking the URL in Facebook (test URL), it gave me this results:

Meta Tag: <meta property="og:description" content="Vi g&#xe5;r spennende tider i m&#xf8;te og f&#xe5;r stadig mer..." />
Meta Tag: <meta property="og:image" content="www.dmtalvdal.no/media/k2/items/cache/ad...6f55c82778c43_XL.jpg" />
Meta Tag: <meta property="og:url" content="www.dmtalvdal.no/blogg/dmt-alvdal-soker-...-og-webutvikler.html" />
Meta Tag: <meta property="og:title" content="DMT Alvdal s&#xc3;&#xb8;ker frontend-utvikler og webutvikler" />
Meta Tag: <meta property="og:type" content="article" />
Meta Tag: <meta property="fb:app_id" content="xxxxxxx" />
Meta Tag: <meta property="og:locale" content="nb_no" />
Meta Tag: <meta property="og:site_name" content="DMT Alvdal AS" />
Last edit: 10 years 7 months ago by dmtalvdal.
The topic has been locked.
Support Specialist
10 years 7 months ago #36916 by alzander
Replied by alzander on topic Encoding issue in Facebook
Can you help me understand where that description value is coming from? Looking at the page, the line that's being used isn't anywhere in the text:

Vi g&#xe5;r spennende tider i m&#xf8;te og f&#xe5;r stadig mer

I understand there are some weird values in there, but if I search for 'tider' or 'stadig', that's not anywhere else in the article. Knowing where that's being set (an Open Graph default value, an Open Graph Object you created for K2 articles, the {SCOpenGraph description=...} tag you used in the article, etc), would help understand where the value may be getting translated improperly.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago #36964 by dmtalvdal
I think this issue is related how the meta property for JFB is set. I notice that the article have a tag like this:
<meta property="og:description" content="Vi g&aring;r spennende tider i m&oslash;te og f&aring;r stadig mer..."/>

The article is a K2 article without metatags, and it seems that JFBConnect fetch some part of the content for the meta property "og:description" from the text. Even if the character encoding is UTF8 on the site, the text is not being translated to correct encoding. It seems that there should be a check to see what encoding the site are running, or add a PHP string function utf8_encode for the "og:description" property
The topic has been locked.
Support Specialist
10 years 7 months ago #36969 by alzander
Replied by alzander on topic Encoding issue in Facebook
We do a lot of checks and encoding of values for proper UTF-8 characters. JFBConnect is used on thousands of non-English sites and there's been a lot of work in that area.

As to what's going on now, I'm really not sure. Can you help answer the question I posted above:

Knowing where that's being set (an Open Graph default value, an Open Graph Object you created for K2 articles, the {SCOpenGraph description=...} tag you used in the article, etc), would help understand where the value may be getting translated improperly.

Basically, do you know where that text is coming from? I know it has some bad encodings on it that you didn't put there, but if those encodings weren't there, where would that sentence have come from? That will really help us narrow down our focus onto the section of code that may be having issues.

Thanks,
Alex
The topic has been locked.