Problem inserting german special Chracters |
[eluser]Skuja[/eluser]
I often get this problem, when i forget to format the view file from ANSI to UTF-8 without BOM
[eluser]breastfed[/eluser]
HA! Waldmeister you are right! I added header('Content-type: text/html; charset=utf-8'); into the Contoller of a Site now it works! So i have to config the Apache. Is there a Way to set the header('Content-type: text/html; charset=utf-8'); for every View instead of setting the header('Content-type: text/html; charset=utf-8'); in each Controller? Thanks a lot!
[eluser]pistolPete[/eluser]
You could add the header(‘...’); into the index.php bootstrapper file; that way it's executed on every request. Or you could use a .htaccess file: http://www.askapache.com/htaccess/settin...ccess.html
[eluser]Skuja[/eluser]
If you don't have many views, try solution I mentioned above. Just open them with some editor that is more advanced than notepad (notepad++ is my favorite) and convert them to UTF-8 without BOM. And in future just do a little your editor configuration and set automatic UTF-8 encoding for all new files you create.
|
Welcome Guest, Not a member yet? Register Sign In |