views:

29

answers:

2

I'm getting � this character in my facebook app instead of "£"- I checked the mysql db and the character is being stored as £. How do i fix this? This has never happened to me before - I'm using PHP as well.

+1  A: 
> £

You need the Character code. Or use UTF-8 Encoding. http://www.w3.org/International/questions/qa-changing-encoding.en.php

Or use the (mb_convert_encoding()) function in PHP as PGL states.

Pino
+1  A: 

Try using mb_convert_encoding() to convert the character from whatever character set it's being stored in, to the character set Facebook is being displayed in.

eg:

$string = mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1')

See: http://php.net/mb%5Fconvert%5Fencoding for more information.

pgl
thanks- i wrote this into a function called cs- convert string as typing out that function and the parameters is very laboriuosfunction cs($item){ $item = mb_convert_encoding($item, 'UTF-8', 'ISO-8859-1'); return $item;}
chris