cURL / Mailing Lists / curl-library / Single Mail

curl-library

is this a bug in libcurl?

From: xiao niu <xiaoniu732000_at_yahoo.com.cn>
Date: Sun, 27 Jul 2003 10:33:08 +0800 (CST)

When i use CURLOPT_FOLLOWLOCATION, i found that if there are chinese characters in the new address the libcurl cannot process it correctly.
 
here is my code:
 
  curl = curl_easy_init();
  if(curl) {
    /* First set the URL that is about to receive our POST. This URL can
       just as well be a https:// URL if that is what should receive the
       data. */
    curl_easy_setopt(curl, CURLOPT_URL, "http://www.joyo.com.cn/ProdSearch/prodsearch.asp?uid=suuszxsswugibgzsmsgsasxww");
    curl_easy_setopt(curl, CURLOPT_POST, 1);
    /* Now specify the POST data */
    curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "vname=linux");
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
    /* Perform the request, res will get the return code */
    res = curl_easy_perform(curl);
    /* always cleanup */
    curl_easy_cleanup(curl);
  }
 
when i set CURLOPT_POSTFIELDS to "vname=linux", the lib can get the right page. but when i set it to "vname=中文", it cannot get the right page.
 
中文 is chinese character.
 
if i don't use CURLOPT_FOLLOWLOCATION, the result is
 
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found here.</body>
 
is this a bug in libcurl? and if you need more information, pls tell me.

---------------------------------
Do You Yahoo!?
暑期大片齐聚雅虎通 网络摄像头+雅虎通调频收音机等你来拿

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-27