lisovaccaro
lisovaccaro

Reputation: 33946

PHP Include: Losing UTF-8 characters on included code

I'm including a menubar through php include and for some reason the menubar doesn't display UTF-8 special characters.

The rest of the page works fine, just not the left navigation.

What could be the reason? I tried adding:

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

on the included file too but I still can't get the caracters.

I'm testing it here: http://www.lilianasanmiguel.com.ar/acol1.php

Upvotes: 2

Views: 1781

Answers (3)

Robin
Robin

Reputation: 4260

Be aware that the standard PHP string functions won't work with UTF-8 - they all assume a fixed with character set. Check your code and make sure you're using the mb_* equivalents instead.

Upvotes: 0

joakimdahlstrom
joakimdahlstrom

Reputation: 1595

Make sure that you actually save the files in UTF-8 encoding in your editor.

Upvotes: 4

wosis
wosis

Reputation: 1219

Check if the file you include is uft-8 encoded. In Eclipse you can do so by right-clicking in the file an check under "Properties"

Upvotes: 2

Related Questions