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 8981609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:22:47+00:00 2026-06-15T20:22:47+00:00

Now I’m working on Wikipedia. In many articles, I noticed some URLs, for example,

  • 0

Now I’m working on Wikipedia. In many articles, I noticed some URLs, for example, https://www.google.com/search?q=%26%E0%B8%89%E0%B8%B1%E0%B8%99, are very long. The example URL can be replaced with “https://www.google.com/search?q=%26ฉัน” (ฉัน is a Thai word) which is shorter and cleaner. However, when I use urllib.unquote function to decode URL, it decodes even %26 and get “https://www.google.com/search?q=&ฉัน” as the result. As you might have noticed, this URL is useless; it doesn’t make a valid link.

Therefore, I want to know how to get decode link while it is valid. I think that decoding only non-ascii character would get the valid URL. Is it correct? and how to do that?

Thanks 🙂

  • 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-06-15T20:22:48+00:00Added an answer on June 15, 2026 at 8:22 pm

    Easiest way, you can replace all URL encode sequence below %80 (%00-%7F) with some placeholder, do a URL decode, and replace the original URL encode sequence back into the placeholder.

    Another way is look for UTF-8 sequences. Your URL appears to be encoded in UTF-8, and Wikipedia uses UTF-8. You can see the Wikipedia entry for UTF-8 for how UTF-8 characters are encoded.

    So, when encoded in URLs, each valid non-ascii UTF-8 character would follow one of these patterns:

    • (%C0-%DF)(%80-%BF)
    • (%E0-%EF)(%80-%BF)(%80-%BF)
    • (%F0-%F7)(%80-%BF)(%80-%BF)(%80-%BF)
    • (%F8-%FB)(%80-%BF)(%80-%BF)(%80-%BF)(%80-%BF)
    • (%FC-%FD)(%80-%BF)(%80-%BF)(%80-%BF)(%80-%BF)(%80-%BF)

    So you can match these patterns in the URL and unquote each character separately.


    However, remember that not all URLs are encoded in UTF-8.

    In some old websites, they still use other character sets, such as Windows-874 for Thai language.

    In such cases, “ฉัน” for that particular website is encoded as “%A9%D1%B9” instead of “%E0%B8%89%E0%B8%B1%E0%B8%99”. If you decode it using urllib.unquote you will get some garbled text like “?ѹ” instead of “ฉัน” and that could break the link.

    So you have to be careful and check if the URL decoding break the link or not. Make sure that the URL you’re decoding is in UTF-8.

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

Sidebar

Related Questions

Now that I'm working in F#, is it time to start writing up some
now i'm working on a project for creating audio unit instrument that provide the
Now I'm trying some tests to erase the actual touch to beam in NFC
Now I have a file with many data in it. And I know the
Now i am working in iPhone application, Using UIImageView to create a animation and
Now I'm working with asp.net mvc, it's good framework. But, in future, I want
Now that Google allows Java on App Engine, I'm wondering what effect this has
Now that Java has allowed multiple additional languages to run on top of Google
Now for some reason i can't get this code to work When i move
Now in my program in c# that simulates the working of a lan-messenger I

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.