Problems when using German umlautes

31 views
Skip to first unread message

dalelane

unread,
Nov 10, 2008, 5:18:36 PM11/10/08
to Twitter Development Talk
I'm having problems when posting updates that contain German umlaut
characters.

The character immediately following some German umlaut characters is
apparently lost.

The problem does not appear to be limited to my app, and can be more
simply repeated using curl:

curl --basic --user username:password --data "status=BEFORE%D6AFTER"
http://twitter.com/statuses/update.xml

results in the following update:

BEFOREÖFTER

My app does specify charset=utf-8 in the header, although this doesn't
appear to be helping.

Any advice as to what I'm doing wrong would be much appreciated.

Esmil

unread,
Nov 11, 2008, 7:50:28 AM11/11/08
to Twitter Development Talk
You should also send your message to twitter in proper UTF-8 format.
The character \0xD6 is encoded in UTF-8 as the two characters
\0xC3\0x96,
so this works:

curl --basic --user username:password --data "status=BEFORE
%C3%96AFTER" http://twitter.com/statuses/update.xml

/Emil

dalelane

unread,
Nov 11, 2008, 9:53:54 AM11/11/08
to Twitter Development Talk
ah, that's very helpful, thanks. I thought I could get away with just
url-encoding the message - I hadn't realise I needed to utf-8 encode
it too.

many thanks for your help

kind regards

Dale
Reply all
Reply to author
Forward
0 new messages