Request for comments: Bug 6306820

Richard Kennard richard at kennardconsulting.com
Mon May 28 15:51:24 PDT 2007


Michael,

 >> 1) java.net.URL is discouraged... I would agree with Alan on this.

Fair enough: I shall remove those methods.

Can you confirm you want the naming convention changed to Url? It's just 
that everything else in the package uses uppercase URL (for legacy 
reasons, I'm sure). Note that the class is called URLEncodedQueryString 
because it models a 'www-form-urlencoded' query string, not because of 
the java.net.URL class.

 > What if a string to be parsed uses ';' as separator, but contains '&' 
chars embedded within it,
 > which are not to be interpreted as separators?

When parsing, ALL separators are recognised. So if a string contains a 
mix of ';' and '&' both will be recognised. You do not specify the 
separator to use at parsing time - only at toString() time.

 > Should we have the possibility to specify the character set, perhaps
 > in the toString() method? In my experience, in some parts of the 
world, particularly Asia,
 > other character sets are often used for web applications.

Earlier versions of URIBuilder did this, but either Alan or yourself 
thought it complicated matters too much. The HTML spec's recommendation 
is UTF-8...

    http://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars

...note that this only applies to URIs - it is a quite separate issue 
than what character set is used on the HTML page.

Regards,

Richard.



More information about the net-dev mailing list