开发者

echo and UTF-8 (PHP)

I have installed Apache on my server (I wasn't using Apache) and special characters started to show wrong.

So I changed every file to UTF-8, configured MySQL to work with UTF-8 and everything worked fine. However, my Python app (which retrieves some information from the website) doesn't work properly.

For example, I had a file "test.php" which returned either 0 or 1. Python code then did whatever with that result.

But now, my Python app doesn't receive "0", I do开发者_高级运维n't know what it gets from the website. I made the app send a GET request to my site with what it was getting and it sent me this: "???0".

What can I do? I tried to change the header to send the result as ISO-8859-1 (as it was before) but isn't working either.


It's BOM symbol. Remove this symbol from script in Notepad++ editor (Menu -> Encoding -> Encode in UTF-8 without BOM).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜