Forum Moderators: coopster

Message Too Old, No Replies

php include charset

Problem with charset when php files is included

         

compage

3:59 pm on Apr 11, 2010 (gmt 0)

10+ Year Member



Hi!

I have a web page with this code
<?php include("galleri.php"); ?>

In the galleri file is the following:
<ul>
<li class="active">
<img src="a.jpg" alt="Beskrivelse" title="Noget tekst med Æ, Ø og Å">
</li>
</ul>

Æ, Ø and Å is danish characters

The problem is that when the page is open in the browser it returns somthing like: Noget tekst med æ, ø og æ..

I've tried different solutions with meta tags, and php commands like the one that translates charset (can't remember the name)...
Nothing seemed to work so please help..

astupidname

4:19 pm on Apr 11, 2010 (gmt 0)

10+ Year Member



Having the proper meta content-type tag for the utf-8 charset on the view page should do the trick:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">


And welcome to webmasterworld!