H
hongseok.yoon
MySQL DB's character-set is UTF8 and RoR(Ruby on Rails)'s database.yml
has a line 'encoding: utf8'.
If I add a new record using RoR's new action via Web Browser, Korean is
stored without problem.
If I set fiels explicitly like 'MyActionRecord['fieldname'] = '<some
Korean letters>', and invoke save method... yes, it works, but Korean
is not saved correctly. English was okay with same code.
How can I convert Korean letters to UTF8 characters? I did many tries
and finally I'm here.
irb(main):001:0> "한글" <-- I can't sure you guys can see this
letter. They are just two Korean letters.
=> "\307\321\261\333" <--- What the hell.....T^T
irb(main):002:0> "aaa" <--- English, of course.
=> "aaa" <--- No problem. - -
Please help...
has a line 'encoding: utf8'.
If I add a new record using RoR's new action via Web Browser, Korean is
stored without problem.
If I set fiels explicitly like 'MyActionRecord['fieldname'] = '<some
Korean letters>', and invoke save method... yes, it works, but Korean
is not saved correctly. English was okay with same code.
How can I convert Korean letters to UTF8 characters? I did many tries
and finally I'm here.
irb(main):001:0> "한글" <-- I can't sure you guys can see this
letter. They are just two Korean letters.
=> "\307\321\261\333" <--- What the hell.....T^T
irb(main):002:0> "aaa" <--- English, of course.
=> "aaa" <--- No problem. - -
Please help...