-1

I'm am having some issues showing Japanese text on my English utf-8 website I have tried the following

<?= $japan[artist];?> but it prints out like this æ¤Žåæž—檎

I have tried to encode it that does not even print it out and I have tried html_entity_decode( $text, ENT_QUOTES, "utf-8" );

If I knew how to encode the Japanese text into UTF-8 that would help I think, but I cant seem to find any information on this or the PHP function.

The database is MongoDB not MYSQL

It worths noting that the text gets saved in JapaneseA text and not utf-8

Mi-Creativity
  • 9,554
  • 10
  • 38
  • 47
RussellHarrower
  • 6,470
  • 21
  • 102
  • 204

1 Answers1

1

I use Persian language and some time have this problem, I think it is not PHP problem, maybe one of this suggestion is your answer:

1-Change your editor encoding to utf-8

2-If using database set it to utf8_general_ci

3-Add this html tag to head of your pages:

old tag(HTML4)

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

and HTML5:

<meta charset="utf-8"/>
Mohammad Kermani
  • 5,188
  • 7
  • 37
  • 61