Search code examples
htmlcssfontswebfonts

How can I display words in a foreign language on an English website?


What I want

Hi, I am building an English website as a hobby about Japanese shrines. The website will need to explain some Japanese words, which will be presented in Japanese.

What I tried

Here is the code:

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
</head>
<body>

    <p>Hello, this is some text</p>
    <p>御朱印</p>

</body>
</html>

This displays fine on my computer, but when it goes live the Japanese word becomes "€€â€•ã€€å¾¡æœ±å°". I tried Googling for help, however I keep coming across things that are not relevant to me.

What I want

How can someone choose to use words such as this on an English website? Presumably Mandarin will be the same, Russian too etc


Solution

  • To display Japanese characters you need to display data in UTF-8 format. If you are developing your website in php use the method utf8_encode