views:

73

answers:

1

Hi, I have a very strange character encoding error: I am sending a textfield to a script via jQuerys ajax function. Assuming 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?

A: 

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.

Christian Smorra