ruby incorrect encoding of pound sign(£)

Problem
You want to pass the £ sign to an http service, but the ruby CGI.escape encodes it incorrectly.

Solution
After using ruby’s CGI.escape for the string as:

then replace the encoding with the pound sign encoding as in:

It should then pass the correct value for the £ sign.