开发者

Why can't I echo an acute accent in PHP?

开发者 https://www.devze.com 2023-02-02 02:56 出处:网络
echo \'´\'; just shows a question mark. I also tried with double quotes, but the same thing happens.I even tried adding a backslash in case it is an escaped character, but tha开发者_Python百科t jus
echo '´';

just shows a question mark. I also tried with double quotes, but the same thing happens. I even tried adding a backslash in case it is an escaped character, but tha开发者_Python百科t just prints the backslash before the question mark.

I have <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > set, and going to Tools -> Page Info on Firefox shows UTF-8.

So why can't I echo an acute accent?


Works for me.

I'm fairly sure that your editor is using an encoding different from UTF-8, most likely ISO-8859-1 most likely UTF-16 (as @BoltClock points out, the backtick is a basic ASCII character so it would work if it were ISO-8859-1).

0

精彩评论

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

关注公众号