cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl with spanish chars

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 27 Jun 2007 18:43:50 +0200 (CEST)

On Wed, 27 Jun 2007, nicolas jungblut wrote:

> I am using libcurl to fetch the contents of a PHP script I use to parse RSS
> Feeds. The problem is that when I have spanish chars en the RSS ( ex.: ñ, á,
> é , Ñ, etc. ), curl fetches them as //YYY , where YYY is the ASCII code...

That makes little sense to me. curl (I assume you mean libcurl here) gets what
you ask it to get. But sure, URL encoding means that anything that isn't plain
ascii letters are mostly encoded as %HH where HH is hexadecimal. libcurl
doesn't URL encode by itself though.

> and when I use those strings I get segmentation fault errors.

When you use what strings? Where/who segmentation faults?

> I tried encoding the data with both UTF-8 and ISO-8859-1 usings PHP
> utf_enconde function, but nothing worked ( plus, I allready know that those
> RSS are ISO-8859-1 encoded...but i tried to encode it againg just in
> case...obviously, I also tried keepeing the data intact).

Are you talking about actual data that is being transfered? If so, then
libcurl is even less involved since libcurl only transfers data and hands it
over exactly as the server delivered it. How to interpret it or how to deal
with it is left to your app.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-06-27