# Chinese Search Parameters/Unicode Support

**URL:** <https://www.ruby-forum.com/t/chinese-search-parameters-unicode-support/108117>\
**Category:** Ruby\
**Created:** [June 29, 2007, 4:53am UTC](https://www.ruby-forum.com/t/chinese-search-parameters-unicode-support/108117 "2007-06-29T04:53:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 29, 2007, 4:53am UTC](https://www.ruby-forum.com/t/chinese-search-parameters-unicode-support/108117/1 "2007-06-29T04:53:04Z")

</div>

Okay a preface, I wish to keep this as simple as possible, so I’m trying  
to work off the basic ruby library with no gems installed (would not  
have a problem with this however)

Basically, I wish to have the program prompt the user for a keyword to  
search by, all is well with my app, except I have no idea how to  
implement a way for the input to be in chinese/japanese/korean

so something along the lines of:

$kcode = ‘u’  
require ‘iconv’

print "please enter search parameter: "  
stdout.flush  
search = gets.chomp

now I tried using Iconv.new(‘Big5’, ‘UTF-8’).Iconv(search) \<–where  
search is asian characters, at least before ruby gets a hold of them

… but this really does nothing. How can I get that user input of  
chinese/japanese/korean characters to be stored for use later on (to  
split/concatenate to other strings etc)

again, not in rails so most previous topics don’t cater to this sort of  
idea. thanks
