Is there a way to fix the characters that display improperly after running this html markup through phpquery::newDocument? There are slated double quotes around -Classics wi
UTF-8 without BOM
encoding. Add this header on top of your script:
header("Content-Type: text/html; charset=UTF-8");
[EDIT]: How to Save Files as UTF-8 without BOM :
On OP request, here's how you can do on Windows:
i had the same problem but when i added
ob_start();
to first line
ob_end_flush();
to the end it seem to be working
I had same problem using phpQuery class. Problem IS as mentioned above, in top voted answer - script file is saved as UTF8-with BOM.
As i had no no chance getting notepad++ on mac osX,
every output i prepared like this utf8_decode()
BOM is meant for MS-windows.
You have this in the <head>
element:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
The next course would be to use HTML entities to display these characters.