Reputation: 3254
I'm pulling information from an XML document using PHP and echoing it to a page. In the XMl document there are special characters like Éamon for example. And when I echo these characters using PHP it looks like Éamon.
Can anyone tell me how I can trans-code these characters so they parse normally?
Upvotes: 1
Views: 745
Reputation: 836
You can use
<meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>
Upvotes: 1
Reputation:
You can just have the browser do it for you. In the header, specify that your character set is utf-8:
header('Content-Type: text/html; charset=utf-8');
Do this before you output anything else to the browser. Now the browser will correctly decode the special characters.
Upvotes: 1