cURL / Mailing Lists / curl-library / Single Mail

curl-library

was: Re: [curlpp-library] A url that supports foreign language and working with charset=UTF-8

From: Jean-Philippe Barrette-LaPierre <jpb_at_rrette.com>
Date: Tue, 28 Sep 2004 09:56:13 -0400

redirected to libcurl-library mailing-list

On September 27, 2004 07:34 pm, Haber, Orna wrote:
> Hi,
>
>
>
> I'm working with curl library (7.11.1) in Windows, communicating to
> Apache server.
>
> I would like to support a URL that embeds foreign language characters,
> such as Japanese.
>
> To do so, I am trying to communicate to the apache server in UTF-8.
>
>
>
> The reason I'm trying to work with utf-8 is to be able to support any
> foreign language (with different ranges for different character sets).
>
>
>
> 1. I have set the charset=UTF-8 as follows:
>
> Set the headers as follows:
>
> LPCSTR CURLFile::c_szContentType = "Content-Type: text/html;
> charset=UTF-8";
>
>
>
> struct curl_slist *headers = NULL;
>
> headers = curl_slist_append(headers, c_szContentType);
>
>
>
>
>
>
>
> 2. I convert the URL-path (string contents) to UTF-8 representation and
> pass it on the server as follows:
>
> curl_easy_setopt(m_curl, CURLOPT_URL, m_utfFileName.getNewBuf());
>
>
>
> (m_utfFileName is an instance of the conversion-to-utf8 class.)
>
>
>
>
>
> The server returns error 403 ("Forbidden").
>
>
>
> Did anyone succeed in passing a URL that embeds Japanese characters?
>
> Did anyone succeed with a UFT-8 settings? What is wrong with the above
> setting?
>
>
>
>
>
> Thanks,
>
> Orna Haber
>
> Email: orna.haber_at_ca.com

-- 
Jean-Philippe Barrette-LaPierre
Maintener of cURLpp (http://rrette.com/curlpp.html)
Received on 2004-09-28