Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
excellent, thank you –  kaklon Sep 27 '11 at 13:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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