bugGNU Wget - Bugs: bug #32688, IRIs not encoded in UTF-8 locale

 
 

bug #32688: IRIs not encoded in UTF-8 locale

Submitted by:  None
Submitted on:  Sat 05 Mar 2011 06:02:30 PM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Name: Magnus HolmgrenOriginator Email: -unavailable-
Open/Closed: OpenRelease: 1.12
Operating System: NoneReproducibility: Every Time
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: No

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 13 Mar 2011 05:04:50 PM UTC, comment #1:

do you have a test case for it? Did you find this problem by investigating the source code?

AFAICS, if the two strings are equal then it doesn't matter which one you are using and there should not be any difference for the caller.

Giuseppe Scrivano <gscrivano>
Project Administrator
Sat 05 Mar 2011 06:02:30 PM UTC, original submission:

there's a bug in iri.c causing international domain names not to be IDN encoded if the current locale is a UTF-8 one.

The problem is that idn_encode expects remote_to_utf8 to return true iff there was something to encode, but remote_to_utf8 returns false if do_conversion didn't change the string, which is the case if the string is pure ASCII or already UTF-8 encoded. The test on line 290 needs to be changed to a check for
high bits. If i->uri_encoding is "UTF-8", the whole iconv bit of course can be skipped or be replaced with a check for valid UTF-8.

Alternatively, idn_encode should not return NULL immediately when remote_to_utf8 returns false. remote_to_utf8 may need to differentiate between "error" and "nothing to encode".

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1