|
Posted by shimmyshack on 05/13/07 12:30
On May 13, 6:58 am, "Peter Parker" <spider...@home.com> wrote:
> The character  shows up multiple times on my parsed strings. I tried to get
> rid of it with the following code without success. Is that character
> represented by anything else? Thanks
>
> $bad_chars = array(chr(194), 'Â');
> str_replace($bad_chars, '', $parsed_string)
sounds like an encoding issue, you need to make sure of the encoding
of the string you are parsing, try converting it to something you are
sure that the parser will understand, like iso-8859-1 from utf-8 for
instance.
consider using mb_ functions which understand multibyte characters,
php has not got good support for character encoding, alot of its
functions are not utf8 aware, but some have options to allow that
awareness, if you are using php5 you are better off than struggling
with php4, but roll on 6.
[Back to original message]
|