Decode the data requested to the api in utf-8

Pull request for issue #706.