Displaying chinese characters in PHP

Discussion in 'PHP' started by zurc, Feb 21, 2007.

  1. #1
    can anyone tell me how to do this....
    thanks
     
    zurc, Feb 21, 2007 IP
  2. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #2
    Use utf8 encoding for the webpage and database.

    Peace,
     
    Barti1987, Feb 22, 2007 IP
  3. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You would also do the same thing you are doing with all your web pages, send the desired CHARSET in the meta tags.

    This is should be done as a matter of course to ensure the user always views your web pages in the correct font and to prevent a malicious third party from using your wesbite to attack users by taking advantage of UTF-8 encoding to trick their browser into using a different CHARSET.

    I learned this from security gurus attending the Feb 12-13 Vancouver PHP Conference 2007.
     
    clancey, Feb 22, 2007 IP