• Resolved mykhaylopetrov

    (@mykhaylopetrov)


    By default, JSON data with Cyrillic characters is encoded in utf-8 format in the form of “\u…..” – the so-called “Unicode Escape Equence”. I have all the text data in Cyrillic characters. That is, by default I get:

    <script type=application/ld+json class="aioseo-schema">
    {
        "@context": "https://schema.org/",
        "@type": "WebSite",
        "name": "\u041c\u043e\u0457 \u0421\u0415\u041e \u0434\u0430\u043d\u0456",
    	..........
    }
    </script>

    But I need to get:

    <script type=application/ld+json class="aioseo-schema">
    {
        "@context": "https://schema.org/",
        "@type": "WebSite",
        "name": "Мо? СЕО дан?",
    	..........
    }
    </script>

    That is, the value of the “name” parameter should be text with Cyrillic symbols, without transformations. This problem is solved by the JSON_UNESCAPED_UNICODE parameter to the json_encode() function.

    How can I achieve this behavior in the Breadcrumbs block?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @mykhaylopetrov,

    Can you explain why it is important for you that unicode characters in your JSON schema are not encoded? Search engines and other crawlers should be aware that characters can be encoded and should decode them before they parse your data.

    Thread Starter mykhaylopetrov

    (@mykhaylopetrov)

    Yes, you are right. If you check this encoded JSON micro-markup in the https://search.google.com/test/rich-results service, it passes validation successfully, and Cyrillic characters are displayed correctly. The fact is that some SEO specialists claim that site pages with Cyrillic characters in micro-markup encoded in JSON via “Unicode Escape Equence” are indexed worse by the Google search engine. As confirmation, there is a corresponding comment at this address https://github.com/Yoast/wordpress-seo/issues/17862.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @mykhaylopetrov,

    Thank you for providing some more details. I’ll discuss this with our team and get back to you by next week.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Just wanted to follow up and let you know we’ll actually discuss this next Monday. Unfortunately our Lead Developer was unavailable this week and I wanted to discuss this with him first before we make any decision.

    Thread Starter mykhaylopetrov

    (@mykhaylopetrov)

    No problem, thank you ??

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @mykhaylopetrov,

    Thank you for your patience.

    Because there is no tangible proof for this yet, we are not going to go ahead yet and add the flag by default, but we would like to add a filter hook that allows you to control this.

    Once we’ve added the filter hook, I’ll let you know and tell you how you to add the flag. I’ll then check back with you after some time has passed and see how the flag has affected your rankings.

    Let me know if that works!

    Thread Starter mykhaylopetrov

    (@mykhaylopetrov)

    Thank you ??

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @mykhaylopetrov,

    We’ll be adding this filter in our 4.3.3 release (in about 2 weeks from now). Here’s our documentation with a code snippet that you can use once the update is out – https://aioseo.com/docs/aioseo_schema_json_flags/

    Thread Starter mykhaylopetrov

    (@mykhaylopetrov)

    @arnaudbroes,
    Thank you very much.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘JSON data with Cyrillic characters’ is closed to new replies.