Hi I would like some information please.
How can I set the utf-8 unicode or charset ISO-8859-7 on my dynamic web page? To give you some feedback: when I'm creating the page on my editor (btw I use Dreamweaver) and typing some text, in greek, inside a <p> tag everything looks fine, but when I preview it on the browser (firefox) all the text turns into strange symbols with no meaning at all
Any help would be appreciated.
P.S Btw jacek this maybe also a good idea for a video tutorial
how to set utf-8 or ISO-8859-7 ???
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to set utf-8 or ISO-8859-7 ???
Set metatag to this:
<META http-equiv="Content-Type" Content="text/html; charset=utf-8">
<META http-equiv="Content-Type" Content="text/html; charset=utf-8">
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to set utf-8 or ISO-8859-7 ???
do I have to do any settings and in my database or my php? if yes, could you please tell me with details so not to make any errors
Re: how to set utf-8 or ISO-8859-7 ???
You need to set it in the database too, if you go to the structure tab in phpmyadmin the thing you see under Collation is basically the charset. To change it you need to use the Operations tab, and the one you want is the very last one in the list utf8_unicode_ci.
The one that catches most people out is htmlentities, that has an optional parameter to specify the charset and it defaults to something odd so you have to do.
The one that catches most people out is htmlentities, that has an optional parameter to specify the charset and it defaults to something odd so you have to do.
$string = htmlentities($string, ENT_COMPAT, 'UTF-8');This was actually changed in the most recent version of php to make utf-8 the default.