cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Call of url_easy_unescape( ) with first parameter null

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Thu, 2 Aug 2007 16:15:45 +0200

 

> What are the side effects of calling the function

> char *curl_easy_unescape( CURL * curl , char * url , int inlength ,
int * outlength );

> with curl pointing to NULL? I want to simply unescape an URL but I
don't want to init a handler.

This is OK on ASCII-based platforms or using an ASCII-compiled libcurl.

On a non-ASCII (i.e.: EBCDIC) host with conversions, hexadecimal escapes
(%xx) are translated to the corresponding ASCII characters, instead of
the equivalent character in the host character set.

... So this use is not portable !
Received on 2007-08-02