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
2009-11-25 14:51:56
+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
2009-11-25 14:53:20
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
2009-11-25 15:02:48