specify encoding in the header:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
...
encode string when handling the input
$str=utf8_encode($str);
if you are displaying the input back as-is, no encoding is required; however, if the value is the content of an input or textarea, escape the html characters
<?php echo htmlspecialchars($str); ?>