php and mysql encoding

Discussion in 'Programming/Scripts' started by tera7, May 14, 2007.

  1. tera7

    tera7 New Member

    ok i have a site with iso-8859-1 i wanted to change it to utf-8 after a week of googling reading and testing i managed to insert properly the characters at mysql db from my php script.but when i call the script it doesnt show correctly the characters does anybody knows something about that?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you put the right charset into the head section of the HTML file?
     
  3. tera7

    tera7 New Member

    yes i pass the headers properly i also setnames utf8 after connection mysql system variables are all utf8 also the charset is proper on my database but when
    i call it then it is not.i think that php does not set the proper charset when retrieves data from my db.but it behaves good when inserts data.
    oh maybe because my db data iso-8859-1 except from the last that i insert and this is causing the problem?
    but then why phpmyadmin doesnt have problem with this?


    the thing is that these problems has a solution like phpmyadmin never shows wrong charset even if your server isn't set up proper.i say this because some people say that there is no solution to this.my opinion is that everything can be solved thats why we like computers ;)
     
    Last edited: May 15, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

Share This Page