Page 1 of 1

Unicode Characters While Data Processing

Posted: Fri Sep 15, 2017 7:24 am
by kkonline
Hello All,
While working with some data I get characters like \x2F,\x26 etc

http:\x2F\x2Fstocks.us.reuters.com\x2Fstocks\x2Fratios.asp?rpc=66\x26symbol

Could you please suggest how can I convert these characters to regular format like
\x2F to /
\x26 to &

Regards,
Krishna Khanna

Re: Unicode Characters While Data Processing

Posted: Sat Sep 16, 2017 1:08 pm
by Christopher
To replace them in strings, use functions like iconv() or htmlentities(), or manually with str_replace() or preg_replace(). Many frameworks have a class that does this, you could use one of those.