CHttpException and accent


When I’m triggering CHttpException without accent, the message is displayed correctly in the error page.

But if I use accents in the error message the message isn’t displayed.

throw new CHttpException(403,"Vous n'êtes pas autorisé à effectuer cette action.");

If I remove the encode function, in the error page

<?php echo CHtml::encode($message); ?>


<?php echo $message; ?>

The message incorrectly encoded:

Vous n'�tes pas autoris� � effectuer cette action.

How can I solve this issue?

Save the file as UTF-8.


Thanks a lot.

Indeed it was the only file not saved in UTF-8 format.