ATTN Twitter: Tweet encoding problems in JSON requests

0 views
Skip to first unread message

Hans Engel

unread,
Jul 29, 2008, 7:56:25 PM7/29/08
to twitter-deve...@googlegroups.com
Hi,
A user of my client just brought up a problem with non-ASCII characters.
After a bit of diagnostics, it seems to be on Twitter's end.

Here is the resolved support topic:
http://getsatisfaction.com/twitkit/topics/quotes_display_in_twitkit_as_8220#reply_551728

Now, I know that the XML entities should come through like that - but
the problem is the JSON feed. I made a request for the tweet that he
made, and it returned the text with the _XML entity_.

However, I made a JSON request to show user 'turutosiya', a Japanese
user that I know - and it came through encoded correctly in JSON. I
tried doing it in XML next, and they were XML entities.

So, to summarize - for some reason, the left/right non-ASCII quotes
aren't encoded properly in the JSON.

Hopefully this can get resolved soon.

-Hans

Alex Payne

unread,
Jul 30, 2008, 1:26:40 PM7/30/08
to twitter-deve...@googlegroups.com
Not to be a pain, but if you could file an issue at
http://code.google.com/p/twitter-api/issues/list that would be most
helpful.

--
Alex Payne
http://twitter.com/al3x

Hans Engel

unread,
Jul 30, 2008, 1:53:36 PM7/30/08
to twitter-deve...@googlegroups.com
Sure. Sorry - wasn't aware of the bugtracker before.

Hans Engel

unread,
Jul 30, 2008, 2:02:35 PM7/30/08
to twitter-deve...@googlegroups.com
Here's the issue:

http://code.google.com/p/twitter-api/issues/detail?id=42

Attached the API responses as well - figured they might help.

Kee Hinckley

unread,
Jul 30, 2008, 5:57:17 PM7/30/08
to twitter-deve...@googlegroups.com

On Jul 30, 2008, at 2:02 PM, Hans Engel wrote:

>
> Here's the issue:
>
> http://code.google.com/p/twitter-api/issues/detail?id=42
>
> Attached the API responses as well - figured they might help.

I just added a comment to this, because I'm seeing a different problem
that may be related.

JSON is returning inconsistent encoding of HTML entities.
curl http://twitter.com/statuses/show/00000000000854144892.xml
returns
okay, since everyone is asking, it's just a copy & paste bit
using ascii characters █████ <-
copy & paste into appropriate place. lol

Whereas
curl http://twitter.com/statuses/show/00000000000854144892.json
returns
okay, since everyone is asking, it's just a copy & paste bit using
ascii characters \u2588\u2588\u2588\u2588\u2588 <- copy & paste
into appropriate place. lol

< is not expanded, but & has been expanded. That doesn't seem
correct.

Reply all
Reply to author
Forward
0 new messages