Problems when using German umlautes

31 pregled
Pređi na prvu nepročitanu poruku

dalelane

nepročitano,
10. 11. 2008. 17:18:3610.11.08.
– 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

nepročitano,
11. 11. 2008. 07:50:2811.11.08.
– 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

nepročitano,
11. 11. 2008. 09:53:5411.11.08.
– 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
Odgovori svima
Odgovori autoru
Prosledi
0 novih poruka