[wwwsearch-commits] r27431 - wwwsearch/mechanize/trunk/mechanize
jjlee at codespeak.net
jjlee at codespeak.net
Fri May 19 02:00:41 CEST 2006
Author: jjlee
Date: Fri May 19 02:00:40 2006
New Revision: 27431
Modified:
wwwsearch/mechanize/trunk/mechanize/_html.py
Log:
Add comment re clean_url()
Modified: wwwsearch/mechanize/trunk/mechanize/_html.py
==============================================================================
--- wwwsearch/mechanize/trunk/mechanize/_html.py (original)
+++ wwwsearch/mechanize/trunk/mechanize/_html.py Fri May 19 02:00:40 2006
@@ -107,6 +107,12 @@
def clean_url(url, encoding):
# percent-encode illegal URL characters
+ # Trying to come up with test cases for this gave me a headache, revisit
+ # when do switch to unicode.
+ # Somebody else's comments (lost the attribution):
+## - IE will return you the url in the encoding you send it
+## - Mozilla/Firefox will send you latin-1 if there's no non latin-1
+## characters in your link. It will send you utf-8 however if there are...
if type(url) == type(""):
url = url.decode(encoding, "replace")
url = url.strip()
More information about the wwwsearch-commits
mailing list