Why do foreign characters like æøå result in 400?



I have a small but very important issue.

When I tweet from my form using Danish characters like æøå it results in a bad request.

I have tried to put header(“Content-Type:text/html; charset=UTF-8”); in my scripts, but without luck.

& a e l i g ; results in: & a e l i g ; in the statusupdates where I expect æ (edit: added space in this example since the output was “æ results in æ”.) :o)

Can anyone please help me?



How are you sending this data to the API? Typically you wouldn’t just be using a form. Are you properly percent-encoding the UTF-8 characters once you’ve encoded them? We don’t accept text/html as a Content-Type in the API.


$tweet_text = ‘ø’;
array(‘status’ => urlencode($tweet_text)));