Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 794117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:15:53+00:00 2026-05-14T22:15:53+00:00

I am working on a web application where I have to encode and decode

  • 0

I am working on a web application where I have to encode and decode a string at the JavaScript side and Ruby backend of the code. the only problem is that the escape methods for JavaScript and Ruby have a small difference. in JavaScript the " " is treated as "%20" but in ruby the " " is encoded to "+".

Any way to solve this? Another Ruby method to encode a string in raw URL encode?

After some Selenium testing I noticed that for some reason the URI.unescape mixes up between the "£" and the "?". If I use encodeURIComponent("£"); in JavaScript and then URI.unescape("%C2%A3") in Ruby which is the value we get when we encode the "£" sign, I get the "?" sign returned. Any solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:15:55+00:00Added an answer on May 14, 2026 at 10:15 pm

    Use

    URI.escape(foo, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
    

    in ruby, and

    encodeURIComponent(foo); 
    

    in javascript

    Both these will behave equally and encode space as %20.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web application that will have a custom UI for the
I have am working on a web application that makes use of helper classes.
I'm working on a web application. I have entities that are supposed to be
I have a working web application that uses username/password SpringSecurity configuration. Now I want
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I am working on a web application where I have to tell user that
I am working on web application (used PHP, javascript language) , I have provided
I'm currently working on web application using VB in ASP.NET. Right now I have
I am working on a web application (asp.net mvc3) I have a Main div.
I have one web application which I have been working for some time.I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.