I am trying to perform searches in Japanese using the custom google search api as follows:
require 'httparty'
require 'json'
class Search
include HTTParty
format :json
end
@response = Search.get('https://www.googleapis.com/customsearch/v1?key=etcetc&q=JAPANESE SEARCH TERM')
When Japanese text is used it fails complaining of “invalid multibyte char (US-ASCII)”
How can I input Japanese text in a format which Ruby allows and google custom api also accepts?
Thanks for any advice.
add
to the top of the file