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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:50:46+00:00 2026-05-23T11:50:46+00:00

What encoding do I need to use to encode the string document.write(‘website%40site.com’); so that

  • 0

What encoding do I need to use to encode the string document.write('website%40site.com'); so that it will look like the string below?

%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%5c%22%6d%61%69%6c%74%6f%3a%63%68%75%6d%61%6b%73%68%6c%69%61%68%40%6d%61%69%6c%2e%72%75%5c%22%3e%63%68%75%6d%61%6b%73%68%6c%69%61%68%40%6d%61%69%6c%2e%72%75%3c%5c%2f%61%3e%27%29%3b

  • 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-23T11:50:46+00:00Added an answer on May 23, 2026 at 11:50 am

    That is the same type of encoding as URL encoding, except that all characters are encoded instead of only the ones that actually need encoding. Each byte is converted into a two digit hexadecimal number, prefixed with %.

    You can encode the string using UTF-8, then convert each byte to a hex code:

    string encoded = String.Concat(
      Encoding.UTF8.GetBytes("document.write('website%40site.com');")
      .Select(b => "%" + b.ToString("x2"))
      .ToArray()
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a python script (Yes not Bash) that will use flac
I need to detect character encoding in HTTP responses. To do this I look
In my app I need to encode a string via base64, escape it's possible
Is there a way to encode any string with any encoding into UTF-8? Is
I use JSON to encode an array, and I get a string like this:
Assume that I need to insert the following document: { title: 'Péter' } (note
I need to setup my PostgreSQL DB's text encoding to handle non-American English characters
Is there a URL encoding function in XSLT version 1? I need something similar
If I skip, do I still need to read the end element? reader.ReadStartElement(ENCODING); reader.Skip();
Encoding issues are among the one topic that have bitten me most often during

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.