Re: dealing with MSWord curly quotes in text

From: Date: Thu, 21 Feb 2002 01:02:16 +0000
Subject: Re: dealing with MSWord curly quotes in text
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85645@lists.php.net to get a copy of this message
Hey Austin: > text has been edited in MSWord and the > quotes that it uses get turned into question marks. does anyone know a > way to convert these MSWord quotes to normal " marks? Replace the nasties with preg... $Data = preg_replace('/[\x93\x94]/', '"', $Data); I figured out the Hex numbers of the offending characters by pasting such an offensive character into the following piece of code where the "x" is... echo dechex(ord('x')); You could use the same principles to replace all sorts of junk. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#85645) next »