Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2006
    Posts
    64
    Thanks
    0
    Thanked 1 Time in 1 Post

    how to convert hex strings to ascii

    I've been searching PHP manuals for a function to convert hex strings to ascii characters and can't find anything that doesn't require a lot of coding.

    I have an ascci data file with rows like this:

    "Busy doing nothing, %2bnothing%2f much to do, trying not to find lots of things not to do"

    is there function to inspect the string and convert the %2b and %2f to their ascii characters?

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,026
    Thanks
    2
    Thanked 315 Times in 307 Posts
    Take a look at the urldecode(...) function.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    New Coder
    Join Date
    Aug 2006
    Posts
    64
    Thanks
    0
    Thanked 1 Time in 1 Post
    I've been looking for that all afternoon.

    Thanks

  • #4
    New to the CF scene
    Join Date
    Apr 2010
    Location
    UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you

    That is superb....I am sooo glad I found this.

    I was struggling with a custom variable sent back by Paypal to a wordpress plugin WPDirectoryPro. It was not recognising the information fed back by the Paypal IPN due to ascii chars being converted, somewhere, into hex!

    This is excellent!! Save my life...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •