co.ador Posted August 9, 2009 Share Posted August 9, 2009 I am facing the following problem and it's that when I change the meta from charset=ISO-8859-1" to "utf-8" then the characters above don't appear. For instance instead of Pesuñas it appear Pesuas without the "ñ" <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> the actual charset set up for the entire website is Quote: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <html> <head> <link type="text/css" href="../stylesheets/shoeswebpageprueba.css" rel="stylesheet" media="all" /> <title>NYhungry</title> <script type="text/javascript" src="scripts/prototype.js"></script> <script type="text/javascript" src="scripts/rating.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script> $(function() { var default_image = $('td.largethumb img').attr('src'); $('table.smallthumbs a').mouseover(function() { $('td.largethumb img').attr('src', $('img', this).attr('src')); }); }); </script> </head> Notice that the <meta> is outside the html tags Thank you... How can I change the meta from charset=ISO-8859-1" to "utf-8" and still having able to have those character displaying without disappearing? Link to comment https://forums.phpfreaks.com/topic/169435-character-encoding-issues/ Share on other sites More sharing options...
Zyx Posted August 9, 2009 Share Posted August 9, 2009 Browsers ignore META tags, when it comes to UTF-8. This information must be sent as a HTTP header: header('Content-type: text/html;charset=utf-8'); If you are using MySQL, remember that you must set a proper encoding for it, too. Link to comment https://forums.phpfreaks.com/topic/169435-character-encoding-issues/#findComment-893957 Share on other sites More sharing options...
co.ador Posted August 9, 2009 Author Share Posted August 9, 2009 Where can I set up the proper encoding in mysql? I have a database already formed but I don't know where can I go to check what kind of encoding is mysql using. Link to comment https://forums.phpfreaks.com/topic/169435-character-encoding-issues/#findComment-894106 Share on other sites More sharing options...
co.ador Posted August 9, 2009 Author Share Posted August 9, 2009 header('Content-type: text/html;charset=utf-8'); If I use this header with charset=utf-8 then it won't display the characters For instance instead of Pesuñas it appear Pesuas without the ñ The e.g above occurs when I charset=uft-8 how can I still display those characters using uft-8 Someone talked to me about htmlentities but how can I build an htmlentities to display this characters é, ', ñ, ú, ó é Link to comment https://forums.phpfreaks.com/topic/169435-character-encoding-issues/#findComment-894115 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.