Problems when using German umlautes

31 görüntüleme
İlk okunmamış mesaja atla

dalelane

okunmadı,
10 Kas 2008 17:18:3610.11.2008
alıcı 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

okunmadı,
11 Kas 2008 07:50:2811.11.2008
alıcı 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

okunmadı,
11 Kas 2008 09:53:5411.11.2008
alıcı 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
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti