character Â

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Parker

    #1

    character Â

    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($ba d_chars, '', $parsed_string)


  • shimmyshack

    #2
    =?iso-8859-1?q?Re:_charact er_=C2?=

    On May 13, 6:58 am, "Peter Parker" <spider...@home .comwrote:
    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($ba d_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.

    Comment

    • Schraalhans Keukenmeester

      #3
      Re: =?iso-8859-1?q?Re:_charact er_=C2?=

      At Sun, 13 May 2007 05:30:51 -0700, shimmyshack let his monkeys type:
      On May 13, 6:58 am, "Peter Parker" <spider...@home .comwrote:
      >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($b ad_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.
      O.T., Shimmyshack is it my newsreader not capable of handling the type of
      subject string you send, or is it something misconfigured in your system
      or at the google groups end ?? All your posts appear in my header pane
      formatted roughly like:

      =?iso-8859-1?q?Re:_charact er_=C2?=

      I am using pan 0.14.2 btw, on Gentoo Linux, kernel 2.6.17-gentoo-r7

      Rgds
      Sh.

      Comment

      Working...