]> sjero.net Git - wget/commitdiff
Fixes: use encoding got from the remote server serving the list file and use quote_n...
authorSaint Xavier <wget@sxav.eu>
Fri, 15 Aug 2008 13:03:38 +0000 (15:03 +0200)
committerSaint Xavier <wget@sxav.eu>
Fri, 15 Aug 2008 13:03:38 +0000 (15:03 +0200)
src/retr.c

index 0aa95072777b370475705b657568c78ee51983c6..28a6d874bd789247121d7587250926237926c9d7 100644 (file)
@@ -636,8 +636,8 @@ retrieve_url (const char *origurl, char **file, char **newloc,
       return URLERROR;
     }
 
-  DEBUGP (("[IRI Retrieving %s with %s (UTF-8=%d)\n", quote (url),
-           iri->uri_encoding ? quote (iri->uri_encoding) : "None",
+  DEBUGP (("[IRI Retrieving %s with %s (UTF-8=%d)\n", quote_n (0, url),
+           iri->uri_encoding ? quote_n (1, iri->uri_encoding) : "None",
            iri->utf8_encode));
 
   if (!refurl)
@@ -880,6 +880,10 @@ retrieve_from_file (const char *file, bool html, int *count)
 
       if (dt & TEXTHTML)
         html = true;
+
+      /* If we have a found a content encoding, use it */
+      if (iri->content_encoding)
+         set_uri_encoding (iri, iri->content_encoding, false);
     }
   else
     input_file = (char *) file;