[REBOL] Re: URL handling
From: hallvard:ystad:helpinhand at: 21-Sep-2001 21:05
Holger Kruse skrev (18.43 21.09.2001):
>The other use of % characters is to escape characters in the actual
>URL for protocol transfer, e.g. control characters or international
>characters which, according to the specs, are not allowed in URLs.
The specs are about to be changed. I know it's still in some kind of beta state, but
international characters are about to be allowed in URLs. As an example (I take it from
your name that you're danish, Holger), have a look at http://www.ĝl.nu/ (I have succeeded
in viewing this URL with MSIE on windows, but not on my Linux machine).
>There are several different workarounds. One is to use spec blocks
>(make port! [host: "..." path: "..." ...]) instead of URLs. Another
>workaround is to use 'to-url with strings, as you did.
Yes, but there's one thing to keep in mind. The following does NOT work:
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%F8g
because rebol identifies the url as an url and interprets it the wrong way before my
to-string is evaluated. So if one receives a url through a referencing word, say 'my-word,
then one has to get the string with something like
my-string: rejoin [{"} my-word {"}]
before converting it to a URL.
~H