geoffjentry/ROAuth — pull request #4 by abicky (2013-03-17 05:51:45+00:00)
Title: support Non-ASCII parameters

RCurl::curlPercentEncode parcent-encodes only ASCII characters and Non-ASCII characters aren't parcent-encoded.
In OAuth 1.0 specification, parameter encoding is defined as below:
>
Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded

cf. http://oauth.net/core/1.0/#encoding_parameters

"the unreserved character set" includes Non-ASCII characters, so currently, for example, twitteR::tweet doesn't work if text argument is Japanese.

> tweet("\u3042")
[1] "Unauthorized"
Error in twInterfaceObj$doAPICall("statuses/update", params = params, :
Error: Unauthorized

I have fixed this issue in this change same as the author of OAuth.R does.
cf. https://gist.github.com/twittoru/586468