views:

373

answers:

2

I begun developing my own SIMPLE twitter client in my server (to bypass twitter.com blocking rule stablished by some dumbass at govt. office)

Please check this image so you can see the accented characters converted into weird symbol:

Screenshot of my app

It is being developed with this class Twitter PHP class by Tijs Verkoyen

This is my heading code, which is utf-8. Can anyone point me to a fix?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>

+1  A: 

try using the utf8_encode() function with PHP

Patrick Gates
utf8_decode() did the job, thanks!
Dimitar Christoff
A: 

best is to avoid hassle if you could pass all your twitter texts(i.e. twitter API delivers JSON format too) using some sort of JSON format and pass those JSON into PHP 5 function

json_decode(jsonStr);

json_decode automatically converts to utf8 encoding which can save you from writing extra code for character encoding..

M A Hossain Tonu