Oh, per capire cosa intendo:

codice:
<?php
print strlen('暴れる'); //9
print '
'.strlen(htmlentities('暴れる')); //35
print '
'.strlen(html_entity_decode('暴れる')); //9
print '
'.strlen(htmlspecialchars_decode(htmlentities('暴れる'))); //35
print '
'.strlen(html_entity_decode(htmlentities('暴れる'))); //9
?>

<script>
alert(
'暴れる'.length
); //3

alert(
encodeURIComponent('暴れる').length
); //27
</script>
fico eh...... ?