0

I'd like to transfered a url with curl, but the accented characters are scrambled. This is what I get:

Bulletin cÙtier pour la bande des 20 milles de Port Camargue ‡ Saint<br>
Raphael le mardi 27 septembre 2011 ‡ 11:30 lÈgales.<br>

This is what it should be

Bulletin côtier pour la bande des 20 milles de Port Camargue à Saint
Raphael le mardi 27 septembre 2011 à 11:30 légales.

I've also noticed that the html file doesn't contain no charset indication in the header:

<html>
<head>
<title>METEO-FRANCE</title>
<META http-equiv="pragma" content="no-cache">
<META http-equiv="expires" content="Thu, 12 Jul 2001 10:09:34 GMT">
</head>

What can I do to retreive the text with the correct characters?

1

Curl just downloads the sequence of bits you've requested as it is. It's your terminal who doesn't handle the encoding. Use a editor or text viewer that handles the original character encoding or encode/decode it to adapt it to your needs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.