ISO-8859-1

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

    #1

    ISO-8859-1

    Hi

    how can i translate this kind of message returned by the PEAR POP3 module:
    =?ISO-8859-1?Q?eBay_-_F=E9licitation s=A0!_Achat_?=
    =?ISO-8859-1?Q?de_l'objet_ :_

    For example, in this sentence I should see: "Félicitati ons" instead of
    "F=E9licitation s".

    Is there a php function to do that?
    One thing, sometimes, the message returned is not encoded, sometimes it is
    encoded with UTF8 etc etc.

    Many thanks for your help

    Rod


  • Alvaro G. Vicario

    #2
    Re: ISO-8859-1

    *** WebRod escribió/wrote (Mon, 24 Jan 2005 21:10:58 +0100):[color=blue]
    > For example, in this sentence I should see: "Félicitati ons" instead of
    > "F=E9licitation s".[/color]

    This may help:

    quoted_printabl e_decode()


    --
    -+ Álvaro G. Vicario - Burgos, Spain
    +- http://www.demogracia.com (la web de humor barnizada para la intemperie)
    ++ Manda tus dudas al grupo, no a mi buzón
    -+ Send your questions to the group, not to my mailbox
    --

    Comment

    • WebRod

      #3
      Re: ISO-8859-1

      thanks for your answer,
      unfortunatelly it does not remove all the "=?ISO-8859-1?Q?".

      I use mb_decode_mimeh eader instead.

      The last problem is that sometimes i get "_" instead space before I use
      mb_decode_mimeh eader and even after.

      any idea?

      "Alvaro G. Vicario" <kAlvaroNOSPAMT HANKS@terra.es> a écrit dans le message
      de news: 1k573nxl9nlii.1 5jowbq1ul7il$.d lg@40tude.net.. .[color=blue]
      > *** WebRod escribió/wrote (Mon, 24 Jan 2005 21:10:58 +0100):[color=green]
      >> For example, in this sentence I should see: "Félicitati ons" instead of
      >> "F=E9licitation s".[/color]
      >
      > This may help:
      >
      > quoted_printabl e_decode()
      >
      >
      > --
      > -+ Álvaro G. Vicario - Burgos, Spain
      > +- http://www.demogracia.com (la web de humor barnizada para la
      > intemperie)
      > ++ Manda tus dudas al grupo, no a mi buzón
      > -+ Send your questions to the group, not to my mailbox
      > --[/color]


      Comment

      • Tim Roberts

        #4
        Re: ISO-8859-1

        "WebRod" <nomail@bouygte l.fr> wrote:[color=blue]
        >
        >thanks for your answer,
        >unfortunatel ly it does not remove all the "=?ISO-8859-1?Q?".[/color]

        Right. That is the magic sequence that tells you it needs to be decoded.
        You can also get ?B? as the last three characters, which says the rest of
        the line is BASE64 encoded, rather than quoted-printable.
        [color=blue]
        >I use mb_decode_mimeh eader instead.
        >
        >The last problem is that sometimes i get "_" instead space before I use
        >mb_decode_mime header and even after.[/color]

        Right. That's part of the specification for this e-mail header encoding.
        You need to change the '_' to ' ' afterward
        --
        - Tim Roberts, timr@probo.com
        Providenza & Boekelheide, Inc.

        Comment

        • steve

          #5
          Re: ISO-8859-1

          "nomail13" wrote:[color=blue]
          >Hi
          >
          >how can i translate this kind of message returned by the PEAR POP3
          >module:
          >=?ISO-8859-1?Q?eBay_-_F=E9licitation s=A0!_Achat_?=
          >=?ISO-8859-1?Q?de_l’objet_ :_
          >
          >For example, in this sentence I should see: "Félicitati ons" instead[/color]
          of[color=blue]
          >
          >"F=E9licitatio ns".
          >
          >Is there a php function to do that?
          >One thing, sometimes, the message returned is not encoded, sometimes
          >it is
          >encoded with UTF8 etc etc.
          >
          >Many thanks for your help
          >
          >Rod[/color]

          See the script here: http://www.cs.iitm.ernet.in/netnews/doc/guide.php
          The script includes functions that do that kind of translation. The
          negative: you have to wade thru a lot of code, but they do have your
          answer.

          --
          Posted using the http://www.dbforumz.com interface, at author's request
          Articles individually checked for conformance to usenet standards
          Topic URL: http://www.dbforumz.com/PHP-ISO-8859-ftopict190860.html
          Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=649790

          Comment

          Working...