开发者

Strange special character encoding error

开发者 https://www.devze.com 2023-01-10 15:20 出处:网络
I have a very strange character encoding error: I am sending a textfield to a script via jQuerys ajax function.

I have a very strange character encoding error: I am sending a textfield to a script via jQuerys ajax function. As开发者_StackOverflow社区suming I want to send the euro sign

echo $string;

produces

however

echo base64_decode(base64_encode($string));

produces

€

any hints on how I could debug this problem?


This is not a real world example though, is it? You are encoding it in one page, and decoding it in another, aren't you? In that case, you need to tell us which character set those pages use.

Pekka was right, my charsets got mixed up, after I set a global UTF8 charset header, everything works fine.

0

精彩评论

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