Bee
Bee

Reputation: 12513

Unicode is not shown in meta tag

I have used unicode in my website's meta tag as follows.

<meta property="og:title" content="ශ්‍රී ලංකා" />

But when I get view source in browser, it is shown as follows.

<meta property="og:title" content="????????" />

How can I avoid this?

Thank you.

Upvotes: 2

Views: 696

Answers (2)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201728

The Sinhala characters in your file have been converted to question marks somewhere in the process of uploading to the server or in server actions. They are actual question marks “?”, U+003F, not problem indicators used by browsers or source viewers. Question marks also appear near the very end of the page in visible content, line 445: <a href="http://www.bitak.net" title="?????" target="_blank">?????</a>

The page appears to be served simply from a static HTML file by an Apache server, with no special server-side technology (though one cannot be sure, when looking from outside). This suggests that something has gone wrong in the upload process, like incorrect character code conversion (assuming you have checked that the file in your authoring system is UTF-8 encoded and displays correctly). This may happen if you transfer a file in “text mode” or “Ascii mode”, so I suggest uploading it again, in as raw mode as possible.

Upvotes: 2

GG.
GG.

Reputation: 21854

With an editor like Notepadd++, you must change the file encoding to UTF-8:

Encoding

Upvotes: 2

Related Questions