RE: [PHP] RE: Re: high-bit characters

2007-06-09 Thread Richard Lynch
On Sat, June 9, 2007 10:43 am, WeberSites LTD wrote: > I do want to allow some chars so I'm trying to replace them > like this : > > $post_text=str_replace(chr(146),"'",$post_text); > > or > > $post_text=str_replace("’","'",$post_text); > > > However, it seems that str_replace does not actually rep

RE: [PHP] RE: Re: high-bit characters

2007-06-09 Thread WeberSites LTD
es not actually replace the chars cause they still end up in the output. any idea? berber -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Abdullah Ramazanoglu Sent: Saturday, June 09, 2007 3:21 PM To: php-general@lists.php.net Subject: [PHP] RE: Re: high-bit characters

[PHP] RE: Re: high-bit characters

2007-06-09 Thread Abdullah Ramazanoglu
WeberSites LTD dedi ki: > Thanks, I'll check this out. > > Till now I managed to get the result I wanted with : > > for ($i=0 ; $i < strlen($post_text) ; $i++) { > $chr = $post_text{$i}; > $ord = ord($chr); > if (($ord<32 or $ord>126) and ($ord != 13) and ($ord != > 10)){ > Echo "BAD CHAR is :