Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter thikoneres2016

    (@thikoneres2016)

    After doing some research, I think the problem could be related to <meta charset> but I’m not sure of this

    I know Instant Articles are set to use utf-8 by default. When I tried to change it on Facebook Dashboard to ISO-8859-1, it gives me an error related to charset.

    What I can’t understand is why my blog already uses utf-8 and accents are fine, but on dashboard they got broken.

    Plugin Author evertonrosario

    (@evertonrosario)

    Hi, thikoneres2016. Thanks for the feedback.

    Could you provide some more information about the issue you’re having? That will help us reproduce the issue.

    – What version of the plugin are you using?
    – What version of WordPress are you using?
    – What version of PHP are you using?
    – What’s the debug output shown in the post edit screen on the Facebook Instant Article box (both sides)?
    – What is the charset of your database for WordPress? The collation used.

    I did some research about your published articles.
    This is the one Im looking right now:
    https://bit.blog.br/transmissoes-de-eventos-esportivos-em-redes-sociais-4423

    Looks like the title is escaped correctly:

    <h1>Transmiss?es de eventos esportivos em redes sociais</h1>

    But the body of article, seems to be in another charset:

    <p>Esporte ?? algo que acontece ao vivo e sem roteiro. Eles? mexem com nossa? raz?£o e emo?§?£o? – especialmente em um pa?-s com grande tradi?§?£o esportiva, como o Brasil – de modo que ?? natural o impulso? de querermos registrar? nossas opini?μes sobre eles nas redes sociais.</p>

    Thanks again!

    Thread Starter thikoneres2016

    (@thikoneres2016)

    Here are the prints about the encoding issue: https://postimg.org/gallery/2j31q28fq/

    My regular RSS Feed:?https://bit.blog.br/feed

    Plugin RSS Feed:?https://bit.blog.br/feed/instant-articles

    Original post:?https://bit.blog.br/landing-jobs-evento-ti-europa-brasileiros-4411

    * I noticed that titles are fine, even if they have special characters like accents. The problem is post content.

    Setup prints: https://postimg.org/gallery/o35kf95q/

    PHP version 5.5.30
    MySQL version 5.5.48.
    Plugin version 2.7

    Same problem, can’t understand why this occurs only with this plugin and not on the rest of website…

    More technical information :

    plugin version 2.8
    PHP 7.0
    mysql 5.6.28

    stranger is that with latest release of MAMP for Mac, in localhost, I don’t have the accents problem…

    This was fixed in this ticket https://github.com/Automattic/facebook-instant-articles-wp/issues/116

    Here is the commit in the file “fb-instant-articles/class-instant-articles-post.php” line 666 just and else to fix encoding

    else {
    		$content = htmlspecialchars_decode( utf8_decode( htmlentities( $content, 		      	ENT_COMPAT, 'utf-8', false ) ) );
     		}

    https://github.com/Automattic/facebook-instant-articles-wp/commit/4ab869bcf907119b3aa18f95e5efec389f418ba1

    I was having the same problem and this fix it, hope they add it in the next update of this plugin.

    Thanks to the developers and the guy how fix it!

    @modee, thanks for reporting this fixed.

    @thikoneres2016, @unsacsurledos, it’d be great to get confirmation that by installing the latest version of the plugin (v2.9), the problem goes away.

    For now, I’m marking this issue as resolved since a fix is available for download. Please re-open if the problem persists.

    Hello,

    I’m using version 3.1.3 and getting incorrect accent chars inside H1 element (that is created automatically inside header). This is the only problem. The rest (title and text) are correct.

    This is the RSS: https://fiquelinda.com.br/feed/instant-articles

    Does anyone knows what should I do to fix this?

    Thanks in advanced.

    I’ve found the problem:

    At the file
    class-instant-articles-post.php
    line 638
    I’ve added utf8_decode to $title variable:

    $document->loadHTML( '<?xml encoding="' . $blog_charset . '" ?><h1>' . utf8_decode($title) . '</h1>' );

    And now it’s working corrrectly.

    I don’t know if this is the best approach, but it worked for me.
    (version 3.1.3)

    @programadorgw, the following update was made in the latest version of the plugin (v3.2). Can you see if this also resolves your issue in a native way?

    @demoive, the problem was not solved. In this version (3.2) I had to put again the utf8_decode command.
    Line 639 for me at this moment:
    $document->loadHTML( '<?xml encoding="' . $blog_charset . '" ?><h1>' . utf8_decode($title) . '</h1>' );

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Accents missing’ is closed to new replies.