the ruby UTF8 (although the documentation I can find suggests that the
encodeURIComponent('中文') = '%D6%D0%CE%C4'
=> "%E4%B8%AD%E6%96%87">> ERB::Util.u("中文")
Is there any way to get the same encoded result with ruby code?
The are various libraries for messing around with string encodings,
including iconv, and pack/unpack have some specifiers that are
relevant for unicode stuff, and rails itself also has various unicode
utilities in it.