Removing an octal character....

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Removing an octal character....

Post by nielsene »

I'm trying to import some data that happens to have an octal character that I'd like to replace before the import proceeds. I can't seem to get any of the str_replace or preg_replace to work. Any suggestions?

The character is a right, curving, closing single quote aka \222. I'ld like to replace it with a regular "symmetic" single quote '.

I had hoped that

Code: Select all

$import = str_replace("\222","'",$orig);
would suffice, but its leaving $orig unchanged.
Post Reply