Javascript's encodeURIComponent works differently from CGI.eacape or
ERB::Util.u.
for example:
encodeURIComponent('中文') = '%D6%D0%CE%C4'
but
>> CGI.escape("中文")
=> "%E4%B8%AD%E6%96%87"
>> ERB::Util.u("中文")
=> "%E4%B8%AD%E6%96%87"

Is there any way to get the same encoded result with ruby code?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to