# Utf-8 encoding in URL params

**URL:** <https://www.ruby-forum.com/t/utf-8-encoding-in-url-params/150737>\
**Category:** Rails\
**Created:** [October 12, 2008, 8:54am UTC](https://www.ruby-forum.com/t/utf-8-encoding-in-url-params/150737 "2008-10-12T08:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssyangy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@ssyangy](https://www.ruby-forum.com/u/ssyangy)\
**Post date:** [October 12, 2008, 8:54am UTC](https://www.ruby-forum.com/t/utf-8-encoding-in-url-params/150737/1 "2008-10-12T08:54:41Z")

</div>

Hi,

I’m accessing a web service API. This API is somehow like convert  
input string to a graph.  
this API has a text params. In the specification, this params should  
be UTF-8 encoded.  
what shall I do to ensure of this? or just pass the string to it?

The reason I’m asking is, when I pass some Chinese string to that API,  
some string works fine, some string result in “messy code” in the  
generated graph.

Any idea?

Cheers,  
Joe
