Re: weird character replace '^]'

From: Date: Fri, 05 Jan 2001 09:00:56 +0000
Subject: Re: weird character replace '^]'
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32853@lists.php.net to get a copy of this message
At 19:16 -0700 5/1/01, Dan Harrington wrote:
Hello, I have a text file that has a weird character that I need to replace with a 'space'. Instead of a space between words, it has a '^]' and I can't seem to find the correct character, much less a development of a script using preg_replace() to fix it.
Hi, I had the same problem with an XML newsfeed from Dow Jones. The have character 035 (decimal 29) to delimit a paragraph and another indicate a new line (I guess only <CR> is used instead of the DOS world <CR><LF>, so this screws up on DOS) The 035 character broke the PHP xml parser, witch just stopped parsing and gave me errors or warnings... (I have the same behaviour sometimes when the Sybase server responds an error, the script just stops the output and thats it) The folowing will get rid of the character 035 in the string $data $brol=chr(29); $data=preg_replace ("/$brol/", "", $data); Have fun -- Thierry Coopman - thierry@keytrade.com My opinions are personal, and have really nothing or nothing to do with Keytrade! You know that you are drinking too much coffee if: ... You're the employee of the month at a coffeehouse and you don't even work there.

« previous php.general (#32853) next »