InnerHTML changed from English to Hebrew shows question marks

I changed an innerHTML of a Wordpress menu-toggle from English to Hebrew and now it appears as question marks. The reason for doing this with Js is a long story I prefer not to go into. My question is why there are question marks and is there as Js based solution?

That’s the code I used:

let changeLinkText = document.querySelector(".mobile-menu");
changeLinkText.innerHTML = "תפריט";

That’s the outcome as seen in my PC from Chrome):

I should note that the site itself includes Hebrew without any problem: Everything is RTLized and translated almost anywhere without problems.

The problem was with the encoding Notepad++ saved the file. I did the following and it was solved:

Encoding > Encode in UTF-8.

So, if it happens to you, make sure you work with an encoding suitable for any non English content you might have.

3 Likes

Declare your languge in html document.See this link HTML lang

Thank you for your response, @liontas76, but you really should read the whole thread first. The solution to the problem was found and described in the previous post.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.