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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:36:26+00:00 2026-05-16T01:36:26+00:00

For some reason, after submitting a string like this Jack’s Spindle from a text

  • 0

For some reason, after submitting a string like this Jack’s Spindle from a text form to php, I get:

Jack%u2019s Spindle

This is not what PHP’s urlencode() would do, which would be Jack%92s+Spindle
or rawurlencode() = Jack%92s%20Spindle

Thus, urldecode() and the raw version don’t work to decode that string… Is there another function for such strings?

—

Also, Jack’s Spindle would be the HTML-safe way to encode the above, but urlencode() and raw* for that yields: Jack%26%238217%3Bs+Spindle and Jack%26%238217%3Bs%20Spindle respectively…

Where is the %u2019 coming from? What does it represent? How do you get it back to just that innoculous apostrophe?

  • 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-16T01:36:26+00:00Added an answer on May 16, 2026 at 1:36 am

    Well, only you can tell us from where that came from. From are you getting your text and which transformations is it being submitted to? I confess I haven’t seen that encoding strategy yet.

    That said, it’s very similar to the way Javascript encodes UTF-16 code units: \uXXXX where each X represents a hexadecimal character. To convert it to HTML entities, you could do:

    preg_replace('/%u([a-fA-F0-9]{4})/', '&#x\\1;', $string)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

for some reason after having changed my code from this: <script type=text/javascript> $(document).ready(function(){ $(recipebutton1).click(function(){
For some reason after updating to Snow Leopard, my Xcode 3.2 is stupid like
For some reason in IE8 when I run this function after an onclick event
I have a PHP/mySQL search script that for some reason, after the latest update
For some reason there's a variable called d that is defined immediately after I
For some reason, after installing the iPhone OS 3.0 SDK, I have no option
I'm running mod_wsgi on apache2. It's running Django and for some reason, after I
Is there a specific reason why some people put a semicolon after the curly
For some reason, this line of code is returning undefined for $(this).attr(href) $(a).attr(href, javascript:page('
For some reason this isn't working, am I missing something obvious? RewriteRule ^(.*)infopopup.html$ /acatalog/infopopup.html

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.