If you have ??? instead of ‘żżż’ on your screen – this is encoding issue.
They come in many colors:
- Your file is not UTF-8. You can check this with Notepad++. Some IDEs like Visual Studio 2019 have ANSI as default file save encoding. This needs to be changed.
- Your initial HTML is not UTF-8. You need to add meta tag with charset=”utf-8″ attribute in the head section.
- Your text in file is already save not in UTF-8 format. Make sure your file is saved as UTF-8 (look 1.) and retype the string.
- You are passing raw invalid information. You need to use and pass encoded variable – encodeURI(variable) and use the decoded one – decodeURI(variable).
- Your inner loaded JS is not UTF-8. You need to add charset=”utf-8″ attribute in the script src tag.