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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:46:40+00:00 2026-05-26T04:46:40+00:00

Im converting my site to utf, which is mostly done except there is legacy

  • 0

Im converting my site to utf, which is mostly done except there is legacy code which needs to make use of stripslashes()

I’ve heard reports that stripslashes can corrupt utf data, but Im not sure I understand why. utf sets the upper bit for all non-first characters (to be compatble with ASCII), so is it safe to run on utf data or not?

Are there potential security vulnerabilities if I try to run stripslashes on utf data. I ran a few tests using invalid utf code with slashes, but wasnt able to come up with any

  • 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-26T04:46:40+00:00Added an answer on May 26, 2026 at 4:46 am

    I don’t see a problem with UTF-8. In fact, most ASCII functions are UTF-8-safe because it is ASCII-compatible. (You only have to worry about lengths and mid-string insertion and deletion.)

    UTF-16 and -32, however, are a problem because they may use characters with ASCII values (<0x80) to represent higher codepoints, which may be misinterpreted as ASCII slashes or quotes.

    Example: "⁜!" (U+205C U+21) in UTF-16BE is 20 5c 00 21 which may be interpreted as " \0!" (where 0 is the NUL byte) and subsequently have its second character removed, corrupting the string.

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

Sidebar

Related Questions

After converting my site to use utf-8, I'm now faced with the prospect of
I need help converting the following code snippet to use SPSiteDataQuery instead of SPQuery
I currently have some code which grabs some JSON from a site. This is
I have a site, say, example.com, which is PHP. I am converting it to
I am converting a personal site over to MVC 2 and I have been
I've been tasked with converting an existing ASP.NET site from using InProc session management
I am in the process of converting a VS 2008 Web Site to a
I am trying to fix an ASP.NET site that a friend had botched converting
Converting my current code project to TDD, I've noticed something. class Foo { public
When converting a project (in which a template method of IComparable was used a

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.