hi!
so I have made a simple form, which can send a name like "Frédéric" to the same php file.
If I try to get the value with $_GET or $_REQUEST, I get "Frédéric" but if I apply htmlentities($name), it puts me out :Frédéric
whats wrong with it ?
I tried already to apply html_entity_decode before putting it out, but the result did not change!
thank you!
special characters in firefox
Moderator: General Moderators
-
helpercenter
- Forum Newbie
- Posts: 5
- Joined: Sat Feb 09, 2008 5:09 pm
Re: special characters in firefox
that does not happens to me. Could you paste your code? Try to just pust the smallest working sample. The following printed exactly what I put in the text. inclusing latin characters.
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
</head>
<body>
<form action="#" method="post">
Data: <input type="text" name="name" />
<input type="submit" />
</form>
<?
echo htmlentities($_POST['name']);
?>
</body>
</html>-
helpercenter
- Forum Newbie
- Posts: 5
- Joined: Sat Feb 09, 2008 5:09 pm
Re: special characters in firefox
hi !
thank you for your reply.
I used now following code and it worked. Do you know another idea ?
thank you
thank you for your reply.
I used now following code and it worked. Do you know another idea ?
Code: Select all
$yourname = htmlentities(trim($yourname),ENT_QUOTES,'utf-8');Re: special characters in firefox
try this
http://www.webheadstart.org/xhtml/encoding/
Code: Select all
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>