Decoding problem

Discussion in 'PHP' started by rajesh_, Oct 13, 2008.

  1. #1
    Hi All,
    I am inserting UTF data into database. Below is the php code.

    PHP Code:

    addslashes(trim(html_entity_decode($name,ENT_NOQUOTES,'UTF-8')) 
    PHP:
    Problem is in development environment data is inserting properly. In production server it inserting in different text.

    Ex :
    Orginal text : François Clerc
    development : François Clerc
    Production : François Clerc

    What will be the reason? please suggest.
     
    rajesh_, Oct 13, 2008 IP
  2. Cesay

    Cesay Peon

    Messages:
    121
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check the charset of the database.
     
    Cesay, Oct 13, 2008 IP
  3. javaongsan

    javaongsan Well-Known Member

    Messages:
    1,054
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #3
    use mysql_real_escape_string($name)
     
    javaongsan, Oct 13, 2008 IP