I'm struggling to save url encoded emoji as text.
I use PostgreSQL, Ruby 2.2.2, Rails 4.1.9. To encode/decode emoji I use ERB::Util module http://ruby-doc.org/stdlib-2.2.2/libdoc/erb/rdoc/ERB/Util.html
On save this
"%F0%9F%98%80"
changes to this
"f09f9880"
Is it connected with postgres column type (text)? Or is it rather active record connected? I'm not even sure where is the issue and solutions from other dbs or languages do not seem to make any sense in my situation.
Not really the answer for my question, but a big help in different direction would be to find a way to encode back unicode to url_encoding (so I could save it decoded and encode again before using).
"f09f9880" => "%F0%9F%98%80"
Many thanks in advance!