Topic-icon JLinkedShare Special Chars

Active Subscriptions:

None
12 years 2 months ago #18350 by MrsColumbo
Well, seems to be a "UTF8 problem" :)

www.hotelmagazin-online.com

When I share an article on Facebook using the JLinkedShare Fb Like Button, the article displays on Facebook with jumbled special chars, i.e. german "Umlaute" being transcribed as i.e. "größtes" --> "größtes".

Where can I set this right?
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #18351 by MrsColumbo
I should add that the page (and DB) is UTF-8 encoded ... so no problem there ...
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #18394 by MrsColumbo
anyone?
The topic has been locked.
Support Specialist
12 years 2 months ago #18407 by alzander
Replied by alzander on topic JLinkedShare Special Chars
MrsColumbo,
Sorry for the delayed response. We monitor the forums on the weekends, but aren't always able to get to every post.

As to your question.. both Facebook and LinkedIn use what are called "Open Graph" tags to describe the page. These let you (the administrator) set the title, description, and image for the page whenever it's shared on Facebook or LinkedIn. When the Open Graph tags aren't set, then both services will analyze the page and pick out the content the think best represents the page.

JLinked currently doesn't offer Open Graph support, but we're expecting to include it in the next release (1-2 months).

However, until then, we should be able to help you fix the weird characters, but we need some more information. Facebook has a tool where you can see how Facebook 'sees' your page:
developers.facebook.com/tools/debug/og/o...agazin-online.com%2F

You'll see in the description area, that the special characters are incorrect. At the bottom of the page is a link to "See exactly what our scraper sees for your URL". If you click into there, you'll see the special characters were returned (or at least interpreted by) Facebook.

Some suggestions on how to fix:
1) Try with a different template. When I use the Atomic template (that comes with Joomla), the description is correct in the debug tool:
developers.facebook.com/tools/debug/og/o...%3Ftemplate%3Datomic
I don't know what about the templates is different, but it seems as though something is being set incorrectly in your template.

Other suggestions that may work with the current template, but I think #1 above is the main culprit:
2) Try disabling GZip compression. Compressing the text can cause some translation issues that browsers handle, but Facebook's automated tools can have issues with.
3) The Response Code that Facebook is showing from your page is 206. This is not the normal response code (200) and could be the problem. That's a server configuration issue, and I'm not sure what's causing that. Usually, it's a sign of an aggressive caching setup which tries to return the page in pieces, and could cause the whole document to not be interpreted properly.

Just so you know, each time you run your page through the debug tool, the page should be refreshed. That way, you can see your change immediately to see if they had a positive effect.

Hope that helps get you started,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #18465 by MrsColumbo
hey, alzander,

THX for the reply - y'know, working as a one man company you often forget that there's such a thing as weekend - sorry for my impatience.

I'll have a go at what you provided me with - thanx again!!!
The topic has been locked.
Support Specialist
12 years 2 months ago #18487 by alzander
Replied by alzander on topic JLinkedShare Special Chars
No problem. We're a 2 man company, so we understand, we definitely work on the weekends as well.. but just mainly look for the "OMG my site isn't working anymore!" posts.. which, fortunately, there are very few of.

Definitely hope the suggestions help, but if you need anything else, just let us know!
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #18625 by MrsColumbo
Hm. I'm afraid there has been no real progress.
Problem is, I can't change the template under any circumstances - it's the customer's will, and so be it :/
Maybe you could point me in the direction of the script/plugin/module that's responsible for prerendering the "Like" content? I could try and force unicode encoding somewhere in the script. I could not find the php- or javascript- or any file that's doing that. is it, by any chance, the "jlinkedsystem.php" file?
I stumbled upon this: www.khawaib.co.uk/forum/76-ka-social-sha...-for-fb-sharing.html
I know it's not your plugin and such, but could I add some custom tagging like this?
AND ... I disabled caching, GZipping was already disabled etc. etc., no change at all I'm afraid
The topic has been locked.
Support Specialist
12 years 2 months ago #18773 by alzander
Replied by alzander on topic JLinkedShare Special Chars
I definitely wasn't trying to get you to change the template wholesale. Mainly just pointing out that special characters should work, but something with your template seemed to be the problem. Hopefully, we can figure out the difference and make something work.

I did some poking around and comparison, and there's only one main thing I can see different between your template (which doesn't work) and the atomic template (which does). In the atomic template, the very first line of output is:
<?xml version="1.0" encoding="utf-8"?>
That seems like a reasonable line to try adding to the output of your template to see if it helps Facebook realize the proper UTF encoding of your page.

As for the link you posted from the other extensino, that's unrelated. Facebook definitely allows foreign characters, and their solution would simply replace the foreign accents with non-accented characters. That could change the meaning and message of your text, and is not recommended.

Please try the code above, and let us know if that works. The only other possible thing we see is that the Facebook Debugger is returning a status code of 206. That means only part of the document is being returned, which indicates Apache is setup in an aggressive caching mode. It's possible that, because the Atomic template has less going on, the partial response holds all the information, whereas your live template is getting truncated. Doubt that's it, but if the above doesn't work, we can help figure out other ideas to test.

Good luck, and keep us posted,
Alex
The topic has been locked.
Active Subscriptions:

None
12 years 2 months ago #18871 by MrsColumbo
THX Alzander for your support!! Alas, it still doesn't work. I put the UTF-8 line in on top of the template but it still displays the wrong characters. What's odd is that the headline displays right whereas the teaser text encodes wrong. Strange ...
At the moment I'm trying to get a bit of support from my hoster. Maybe they can change a server setting.
Support from facebook dev: non-existent as usual.
I'm completely and utterly flabbergasted ... strange things ...
The topic has been locked.
Support Specialist
12 years 2 months ago #19130 by alzander
Replied by alzander on topic JLinkedShare Special Chars
I apologize for the delay. This hasn't been an easy issue to investigate as it's frankly.. strange.

We have come up with another thing for you to test after asking around. We ran a page from your site through the W3 HTML validator, and it wasn't able to parse the document because of a mal-formed UTF-8 character:
validator.w3.org/check?uri=http%3A%2F%2F...=W3C_Validator%2F1.2

The problem character looks to be in your headline rotator module. Specifically, this link, which Google Chrome also seems unable to interpret:
<a  title="Der Österreicher Thomas Temmel (41) hat die Leitung des Spa & Sport Resorts Sveti Martin in Kroatien übernommen. Zuvor machte sich der Steirer einen Namen als Hotelmanager und Consulter für komplexe Tourismusprojekte in Kroatien. Das SPA & SPORT Resort Sveti Martin befindet sich in der n�..."  href="/index.php/rund-ums-hotel/news-rund-ums-hotel/news/1980-2012011802.html"><span>Spa & Sport Resort Sveti Martin unter österreichischer Führung</span>
My best guess for now is to try (temporarily) disabling that module and then re-use the Facebook Debug tool to see if it properly scans your description. Since that rotator is on every page, it would explain why they all don't work. The debug tool usually updates immediately, so you should be able to test quickly:
developers.facebook.com/tools/debug/

If that does work, you'll need to understand why that module is generating an invalid character and fix that.

Really hope that's the solution, but if not, let us know. We haven't forgotten about you. We are running out of ideas, unfortunately though.

Thanks,
Alex
The topic has been locked.