How curl utf8 url?

Hello,

Any idea how to curl and get content of url has utf8 text such as:
الجمارك-تبدأ-اليوم-تخفيض-الرسوم-على-السيارات-الأوروبية-بنسبة-

THX.

I’ve never done it before, but I think curl_setopt is what you need, something like:

$ch = curl_init();
curl_setopt( $ch, CURLOPT_ENCODING, "UTF-8" );

This to notify the curl about the content encoding, the problem is the curl can return nothing with utf8 urls.

First convert your Unicode domain names to punycode. Then you should be able to use it with every HTTP client out there.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.