+2011-07-20 Merinov Nikolay <kim.roader@gmail.com>
+
+ * iri.c (remote_to_utf8): Add test for non-ASCII symbols with
+ UTF-8 URI encoding.
+ * res.c (res_retrieve_file): Fix url_parse call.
+
2011-06-08 Giuseppe Scrivano <gscrivano@southpole.se>
* retr.c (retrieve_from_file): Parse the url careless if IRI is enabled.
if (!i->uri_encoding)
return false;
+ /* When `i->uri_encoding' == "UTF-8" there is nothing to convert. But we must
+ test for non-ASCII symbols for correct hostname processing in `idn_encode'
+ function. */
+ if (!strcmp (i->uri_encoding, "UTF-8"))
+ {
+ int i, len = strlen (str);
+ for (i = 0; i < len; i++)
+ if ((unsigned char) str[i] >= (unsigned char) '\200')
+ {
+ *new = strdup (str);
+ return true;
+ }
+ return false;
+ }
+
cd = iconv_open ("UTF-8", i->uri_encoding);
if (cd == (iconv_t)(-1))
return false;
opt.timestamping = false;
opt.spider = false;
- url_parsed = url_parse (robots_url, &url_err, iri, true);
+ url_parsed = url_parse (robots_url, &url_err, i, true);
if (!url_parsed)
{
char *error = url_error (robots_url, url_err);
+2011-06-03 Merinov Nikolay <kim.roader@gmail.com>
+
+ * Test-idn-cmd-utf8.px: Added test for idn with utf-8 local encoding.
+ * Test-idn-robots-utf8.px: Added test for idn with utf-8 local encoding
+ and robots.txt file.
+ * Makefile.am, run-px: Add new tests.
2011-04-19 Giuseppe Scrivano <gscrivano@gnu.org>
* Makefile.am (LIBS): Add $(LIB_CLOCK_GETTIME).
Test-idn-headers.px \
Test-idn-meta.px \
Test-idn-cmd.px \
+ Test-idn-cmd-utf8.px \
Test-idn-robots.px \
+ Test-idn-robots-utf8.px \
Test-iri.px \
Test-iri-percent.px \
Test-iri-disabled.px \
'Test-idn-headers.px',
'Test-idn-meta.px',
'Test-idn-cmd.px',
+ 'Test-idn-cmd-utf8.px',
'Test-idn-robots.px',
+ 'Test-idn-robots-utf8.px',
'Test-iri.px',
'Test-iri-percent.px',
'Test-iri-disabled.px',