Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uri decode function #2261

Open
osresearch opened this issue Feb 1, 2021 · 3 comments
Open

uri decode function #2261

osresearch opened this issue Feb 1, 2021 · 3 comments

Comments

@osresearch
Copy link

Describe the bug
The @uri string formatter percent-escapes it's input, but there is no filter to reverse the process.

To Reproduce

$ echo '"="' | jq -r '@uri'
%3D

It seems that perhaps @text would convert it back, but it passes the string unmodified:

$ echo '%3D' | jq -R -r '@text'
%3D

Expected behavior
That there would be a @urid or similar to match @base64 / @base64d.

Environment (please complete the following information):

  • Ubuntu LInux 20.04
  • jq version 1.6
@dronefox
Copy link

dronefox commented Jul 9, 2021

Same issue. This function is necessary for processing URLs in locales other than English.

@git-developer
Copy link

Rosetta Code has a demonstration of an URL decoder in jq. It works for my use cases. Is it possible to integrate this code into jq?

@itchyny
Copy link
Contributor

itchyny commented Jun 3, 2023

#798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants