UTF8 and Japanese characters

前端 未结 4 716
星月不相逢
星月不相逢 2021-01-03 11:31

Problem: Foreign character are not displayed as they should be. This includes German, Japanese, Russian and all others excluding English (works perfectly). Ones PHP makes a

4条回答
  •  心在旅途
    2021-01-03 12:04

    You most likely need to set the character set of your database connection to UTF-8.

    How to do that depends on the database library you are using.

    In the old mySQL library, it would be

    mysql_query("SET NAMES utf8");
    

    (pre mySQL 5.0.7) and

    mysql_set_charset("utf8");
    

    for mySQL 5.0.7 and newer.

提交回复
热议问题