Which encoding?

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

    Which encoding?

    Not really a PHP question, but i've got an app that sends me this type of
    encoding:

    á (á) translates to %C3%A1
    ñ (ñ) translates to %C3%B1

    i've tried several decodings with PHP without any good result.
    Anyone knows which type of encoding is this and which function to use in
    order to decode it with PHP?

    TIA.

    --
    Reply to abazan at filnet dot es


  • Julien CROUZET aka c2c

    #2
    Re: Which encoding?

    Après mure réflexion, Alex Bazan a écrit :[color=blue]
    > Not really a PHP question, but i've got an app that sends me this type of
    > encoding:
    >
    > á (á) translates to %C3%A1
    > ñ (ñ) translates to %C3%B1
    >
    > i've tried several decodings with PHP without any good result.
    > Anyone knows which type of encoding is this and which function to use in
    > order to decode it with PHP?
    >
    > TIA.[/color]

    Of course, seems like an an unicode string, the best way would be to
    use
    GNU Recode (http://www.php.net/recode), you can send it to a browser
    with
    $string = recode_string(" unicode..h3", $string);

    --
    Julien CROUZET aka c2c
    julien_|at|_syn ten.com

    Comment

    • Alex Bazan

      #3
      Re: Which encoding?

      > Of course, seems like an an unicode string, the best way would be to[color=blue]
      > use
      > GNU Recode (http://www.php.net/recode), you can send it to a browser
      > with
      > $string = recode_string(" unicode..h3", $string);
      >[/color]

      merci beaucoup.
      it was an utf-8 encoding. i finally decoded it with:

      $string=utf8_de code(rawurlenco de($string));

      --
      Reply to abazan at filnet dot es


      Comment

      • Julien CROUZET aka c2c

        #4
        Re: Which encoding?

        Alex Bazan a exposé le 27/02/2004 :[color=blue][color=green]
        >> Of course, seems like an an unicode string, the best way would be to
        >> use
        >> GNU Recode (http://www.php.net/recode), you can send it to a browser
        >> with
        >> $string = recode_string(" unicode..h3", $string);
        >>[/color]
        >
        > merci beaucoup.
        > it was an utf-8 encoding. i finally decoded it with:
        >
        > $string=utf8_de code(rawurlenco de($string));[/color]

        If you only need ISO-8859-1 chars, utf8_decode will be enought.
        Else, you'll loose chars.

        --
        Julien CROUZET aka c2c
        julien_|at|_syn ten.com

        Comment

        • Alex Bazan

          #5
          Re: Which encoding?

          >>[color=blue][color=green]
          >> $string=utf8_de code(rawurlenco de($string));[/color]
          > If you only need ISO-8859-1 chars, utf8_decode will be enought.
          > Else, you'll loose chars.[/color]

          I meant: $string=utf8_de code(rawurlDeco de($string));

          --
          Reply to abazan at filnet dot es


          Comment

          Working...