Curl scrables accented characters

charsetcurlunix

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?

Best Answer

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