Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: URL handling

From: ryanc:iesco-dms at: 21-Sep-2001 9:06

Try it this way...
>> url: join http:// {krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&ve
j=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g} == http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&vej=&HUSNR=&PO STNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g
>> read url
== { <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w 3.org/TR/html4/loose.dtd"> <html> <head> <title>ww...
>>
Im not sure what part is making it fail, but I suspect it happens during the initial parsing, since quoting it works. --Ryan Hallvard Ystad wrote:
> I'm dealing a bit with a URL that causes some trouble. Look at this: > >> print read > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&vej=&HUSN > R=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g > ** User Error: URL error: > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&nav > n=&vej=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=Søg > ** Near: print read > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&vej > =&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=Søg > >> > > The error disappears if I remove the last parameter (S%F8g / Søg). The > error *also* disappears if I do a detour: > >> print read to-url > "http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&v > ej=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g" > > But look at this: > >> print read to-url to-string > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVW > W&navn=&vej=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g > ** User Error: URL error: > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&nav > n=&vej=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=Søg > ** Near: print read to-url to-string > http://krak.dk/scripts/firmaresultat.asp?pub_ > id=KVWW&navn=&vej=&HUSNR=&POSTNR_FRA=&BY=&omraade=&tlf=&soegeord=&soeginfo=Søg > >> > > So there's definitly something wrong with the reading of this value as a > url. But simply writing it to the rebol console creates no error: > >> > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&vej=&HUSNR=&POSTNR_F > RA=&BY=&omraade=&tlf=&soegeord=&soeginfo=S%F8g > > http://krak.dk/scripts/firmaresultat.asp?pub_id=KVWW&navn=&vej=&HUSNR=&POSTNR_F > RA=&BY=&omraade=&tlf=&soegeord=&soeginfo=Søg > >> > > ..whereas deliberately writing a malformed URL does: > >> http: > ** Script Error: http needs a value > ** Near: http: > >> > > So what's the deal about this URL? Why does the #"ø" cause problems? > > ~H > > Praetera censeo Carthaginem esse delendam > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Ryan Cole Programmer Analyst www.iesco-dms.com 707-468-5400