Re: replace Microsoft characters with standard
| From: | jeremy brand | Date: | Thu, 07 Dec 2000 01:58:22 +0000 |
| Subject: | Re: replace Microsoft characters with standard | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-29022@lists.php.net to get a copy of this message | ||
you can replace anything...
str_replace(chr(XX), '<br>', $string);
Just change XX to the ascii value of the character you want to change.
To figure out what that value is, use your favorite hex editor. Mine
is BVI <http://bvi.linuxave.net/>.
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At least for the people who send me mail about a new language that
they're designing, the general advice is: do it to learn about
how to write a compiler. --Dennis Ritchie
On Wed, 6 Dec 2000, Derek Sivers wrote:
> Date: Wed, 06 Dec 2000 17:44:39 -0800
> From: Derek Sivers <list@hitmedia.com>
> To: php-general@lists.php.net
> Subject: [PHP] replace Microsoft characters with standard
>
> I want to replace Microsoft's curly-quotes with regular html "
> straight-quotes for any incoming text submitted in a form. (And some other
> special-character replacements, too.)
>
> I know str_replace will do it.
>
> BUT - - - How do I find out the character hex values to replace?
>
> What IS that little curly-quote character?
>
> The "..." elipses character that MS Word creates? (which I want to convert
> back into 3 periods.)
>
> OR:
>
> Does PHP4 already have some brilliant function for just this kind of thing?
>
>
>
> Any advice appreciated.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>