Kohana 3 - In View ® shows invalid character

231 Views Asked by At

We are in the process of converting to UTF-8 throughout our site. For the most part we've not had any problems, but presently the ® symbol shows up in the views as an invalid character, but when if the value is output in the Controller then it is displays correctly.

We have made certain to include the meta attribute in the main view:

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

Is there a setting that we are missing?

1

There are 1 best solutions below

1
On

Your files should be UTF-8 encoded (UTF-8 without BOM, ANSI as UTF-8).

Note: Kohanas' HTML::chars() uses Kohana::$charset to decide which charset to use when encoding, so use it instead of htmlspecialchars().