mattrepl/clojure-twitter — Issue #9: clojure-twitter seems to fail convert UTF-8 strings on posting
Author: tomykaira
Created: 2011-10-29 17:27:56+00:00
State: open

The post of DM without URL encoding,

```clojure
(twitter/with-oauth
oauth-consumer
oauth-access-token
oauth-access-token-secret
(twitter/send-direct-message-to-id my-id "こんにちは"))
```

it fails with the following error.

2011/10/30 2:22:11 org.apache.http.impl.client.DefaultRequestDirector handleResponse
Warning: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="http://api.twitter.com"}
twitter.proxy$java.lang.Exception$0: [401] Could not authenticate with OAuth.. [/1/direct_messages/new.json] (NO_SOURCE_FILE:0)

But when the string is apparently encoded,

```clojure
(twitter/with-oauth
oauth-consumer
oauth-access-token
oauth-access-token-secret
(twitter/send-direct-message-to-id my-id (java.net.URLEncoder/encode "こんにちは" "UTF-8")))
```

it succeeds to post.

I saw the packet of POST request, and the text was "%3F%3F%3F%3F%3F%3F"... (this is a result of another UTF-8 string).

I suspect this is because the UTF-8 string is not properly converted in your library.