cURL / Mailing Lists / curl-users / Single Mail

curl-users

How to make a status update at Twitter

From: Roland Mösl <founder_at_pege.org>
Date: Wed, 28 Jul 2010 21:23:05 +0200

I can not find out where my failure is

Twitter expects Unicode at posting.a status update
So I assumed to combine URL-endocding
and UTF-8 encoding.

to POST this, I used --data-binary

The message

Mösl hofft, daß UTF-8 klappt ÄÖÜ äöü ß m² m³

(This lines contains all special German characters and square and cubic)

Tha bacht file to test CURL

c:\internet\cgi.pege.org\cgi-bin\command-curl\curl.exe --user-agent WSC/4.7 --data-binary status=M%C3%B6sl+hofft%2C+da%C3%9F+UTF-8+klappt+%C3%84%C3%96%C3%9C+%C3%A4%C3%B6%C3%BC+%C3%9F+m%C2%B2+m%C2%B3 --user XXX:XXX http://api.twitter.com/1/statuses/update.xml
pause

I applied URL encoding and German speccal characters with Unicode

ö -> %C3%B6 -> B6 insteat of "ö"

But the Result shows, I even failed at the ","

, -> %2C -> C instead of ","

What comes out at Twitter

MB6sl hofftC da9F UTF-8 klappt 84969C A4B6BC 9F mB2 mB3

Please, what am I doing wrong?

best regards

Mösl Roland
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-28