8 – Disqus import does not work for links whose text is in local language (Hindi)

There are 3 types of links for the nodes of my Drupal site.

  1. The failure node/[nest[nest[nid[nid]. Ex: example.com/node/24
  2. Links with the URL alias in English. Ex: example.com/lorem-ipsum
  3. Links with alias URL that has Hindi text. Ex: example.com/-

I'm migrating comments from Drupal 8 at Disqus.

  • First, I export the comments in the XML format provided by Disqus.

  • Then I import the XML file into Disqus.

It works very well for nodes with links of the first two types. But for nodes with a third type of links (with Hindi text in the links), the comments of disks are not displayed. Comments appear to be imported into the admin dashboard but are not loaded on the website.

In the XML file, the links are written in this label.

http://example.com/- अधिनियम

Until now, I've tried using these functions for the link / alias before exporting to an XML file.

rawurldecode ($ alias)

urldecode ($ alias)

rawurlencode ($ alias)

urlencode ($ alias)

check_url ($ alias) // drupal function

I do not know which function to use before exporting the link to an XML file. Please suggest. Thank you.