1
ziwman
Encoding Problem (xNews module)
  • 2013/11/29 17:00

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Hi !
I'm using xNews module to manage News and blog content for tafraout.net community website.

As we are a moroccan community, we will publish news in Arabic characters.

When i publish an article with arabic characters (Title, scoop & content using admin or submission form on the front end), the article page show the characters, but when i share the page on Facebook, the characters are remplaced with : سدÙدÙد٠either, characters like "é" are replaced with "دÙ"

The MySQL database is UTF8 endcoding, the title, scoop and contect field too !
I forced the UTF8 output on the theme.html page !

For example, while i post on Newbb forum a title and contect with Arabic characters, Sharing the page on facebook shows the characters without problem.
I think it's a bad configuration on the xNews module

NB : i've tried News and Publisher module .. they have the sam issue !

Can someone help me to fix this problem ?
Thank you :

Page with arabic characters :
http://www.tafraout.net/modules/xnews/article.php?storyid=2

Testing the page using Facebook debugger :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fxnews%2Farticle.php%3Fstoryid%3D2

2
Mamba
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:01

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


When you look at the "scraped URL" on the Facebook Debug link that you gave us, you can see that Facebook sees correctly the title provided by xNews:
<title>
                            
سدفدفدف XOOPS xNews -
                                            
Portail de Tafraout et ses régions
        
</title>
What it has problems with, is the Facebook elements like:
<meta property="og:title" content="
                            Ø³Ø¯ÙØ¯ÙØ¯Ù - XOOPS - xNews -
                                            Portail de Tafraout et ses régions"
>
Now, if you google for something like "facebook open graph Object Properties wrong international character set", you'll find that other people had also problems with it. Hopefully some of the solutions there will help you to fix the issue. One of the postings indicates that it might be an issue with wrong "og:locale" tags. You don't have them in your page at all, so maybe this is the issue that Facebook doesn't know how to interpreter it . This link to Facebook "Internationalization/Localization" might be helpful. Remember: always google for things! The chances that somebody had already a similar problem are always very high!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

3
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:09

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Mamba wrote:
When you look at the "scraped URL" on the Facebook Debug link that you gave us, you can see that Facebook sees correctly the title provided by xNews:

<title>
                            
سدفدفدف XOOPS xNews -
                                            
Portail de Tafraout et ses régions
        
</title>


What it has problems with, is the Facebook elements like:

<meta property="og:title" content="
                            Ø³Ø¯ÙØ¯ÙØ¯Ù - XOOPS - xNews -
                                            Portail de Tafraout et ses régions"
>


Now, if you google for something like "facebook open graph Object Properties wrong international character set", you'll find that other people had also problems with it. Hopefully some of the solutions there will help you to fix the issue.

One of the postings indicates that it might be an issue with wrong "og:locale" tags. You don't have them in your page at all, so maybe this is the issue that Facebook doesn't know how to interpreter it .

This link to Facebook "Internationalization/Localization" might be helpful.

Remember: always google for things! The chances that somebody had already a similar problem are always very high!


Sure !!
i've checked the og: documentation ! No problem with fb og: configuration.

I think the problem is at xNews module, because Newbb shows no anomaly

Check this Newbb page :
http://www.tafraout.net/modules/newbb/viewtopic.php?topic_id=2160&forum=16

Test on Facebook debugger :
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fnewbb%2Fviewtopic.php%3Ftopic_id%3D2160%26forum%3D16


4
Mamba
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:19

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


And to follow-up on this, it's always good to test it with other XOOPS Website to see if they have the same problem. So I went to to the Facebook Debug site and used the link to XOOPS France webiste News article:http://www.frxoops.org/modules/news/article.php?storyid=1946 which in the title has French characters. And it worked without any problems, which would indicated that the News module works OK, unless it has been modified for French audience. If you look and the "scraped URL", you can see that they have specified language:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
which you don't have in your "scraped URL" page. On the other hand, they don't have any explicit Open Graph tags at all, but Facebook interprets everything correctly anyway. So if I would be you, I would test the theme by adding the language tags, as it is done in the XOOPS France Website.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

5
Mamba
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:35

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Or you might try to add to your theme the OG tags:
<meta property="og:locale:alternate" content="ar_AR">
<
meta property="og:locale:alternate" content="en_US">
<
meta property="og:locale:alternate" content="fr_FR">
Check if once you do it, if the xNews article then shows up correctly.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

6
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 18:36

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


i've added language tag via og:local in the theme.html header ! that doesn't solve the problem.

1.
Question : Why the Arabic characters works fine in Newbb module ?


2. The character problem figure only in the article.php page !

When i try to debug the xNews home page, the arabic characters appear correctly.
LINK :https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.tafraout.net%2Fmodules%2Fxnews

7
Mamba
Re: Encoding Problem (xNews module)
  • 2013/11/29 20:43

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Can you install and test the News module?

xNews has never left the beta stage, and is not developed anymore by the developer who worked on this. So I don't know if anybody has the time to fix a module that is abandoned.

Personally, I don't deal with Facebook, so I don't have any experience with Open Graph etc. Maybe somebody else could help....

Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

8
ziwman
Re: Encoding Problem (xNews module)
  • 2013/11/29 20:47

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Quote:

Mamba wrote:
Can you install and test the News module?

xNews has never left the beta stage, and is not developed anymore by the developer who worked on this. So I don't know if anybody has the time to fix a module that is abandoned.

Personally, I don't deal with Facebook, so I don't have any experience with Open Graph etc. Maybe somebody else could help....



It's really not about OpenGraph API integration (The problem appears in page Source Code and while trying to validate via W3C, it gives an error)

News module ? I will give a try and let you know ...
Thanks !

Login

Who's Online

186 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 186


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits