I am working on a php based site where some texts are greek and some are english. Greek texts are not showing correctly. The file is saved in UTF-8. Is there anything special to do in the header of the html page to show the greek text correctly? My header is like –
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Also when I submit a form containing greek text, I am using –
$firstname = mysql_real_escape_string($_POST['firstname']);
Is this okay to use “mysql_real_escape_string” here?
Try the following:
UTF8_general_cishould do.SET NAMES 'utf8'after connecting or by setting the default connection encoding).header("Content-Type: text/html; charset=utf-8");.