🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #82418

Re: XNEWS: Error with � in URL

#82418
From: Jukka K. Korpela
Date: Fri, 03 Aug 2001 07:53
61 lines
4835 bytes
llanfair@gmx.net (Lawrence Mitchell) wrote:

> The reason I thought [that encoding high-bit characters
> in URLs with the HTML escapes, e.g. förlag]
> was the recommendation of using & in CGI links.

Well, this is largely off-topic, but I do have an on-topic point to make, 
so please bear me:

URLs themselves are not HTML. They are extensively used outside HTML too. 
And the URLs themselves have absolutely nothing to do with HTML escapes.
Within a URL, ö is simply a sequence of six characters.

The recommendation to use & to denote the ampersand character (&) as 
a data character is indeed in HTML specifications, and it applies to
all occurrences, not just URLs. But this is strictly an HTML business: an 
HTML parser (such as a browser's HTML parsing routine) is required to 
recognize the entity & and internally replace it by a single 
ampersand. So if I write in HTML <a href="foo&amp;bar">, then the actual 
URL (a relative one in this case) is foo&bar.

This is a fairly confusing issue for several reasons, one of which is 
that there are specific URL encoding rules*) which _are_ part of the URL 
syntax, and it is very easy to confuse them with the HTML "escapes".
*) See http://www.cs.tut.fi/~jkorpela/HTML3.2/3.5.html#urlenc for a 
summary.

OK, now to on-topic remarks based on the above:

- When posting to Usenet, care needs to be taken when writing URLs.
  They should be in a format suitable for automatic recognition by
  newsreaders. It seems that the simple method of having white space
  (blank or newline) on both sides of a URL is normally sufficient.
  For very long URLs the "<" and ">" delimiters might be needed.
  In any case, one should _not_ use any "HTML escapes" in URLs posted
  to Usenet. In particular, if you cut & paste a URL from HTML source
  to a Usenet article, you need to "unescape" e.g. &amp; to &.

- People may fail to do the above, and the question arises whether
  newsreaders should help their users somehow. Should a newsreader
  check, after somehow recognizing that there's a URL in a message,
  whether it contains "HTML escapes" like &amp; and make some guess
  on what the poster actually meant? I'd say no. (The theoretical
  reason is that &amp; is perfectly correct formally in a URL and
  means what it means. The practical reason is that such guessing would
  inevitably get too complicated and cause confusion.) But when _writing_
  an article, a newsreader could give some help. It could have a function
  "insert URL", which lets the user type a URL so that the newsreader
  performs some syntax checking on it. This might help in avoiding
  common errors like http:/something or the accidental inclusion of non-
  Ascii characters into URLs especially when writing them "by hand". It
  would require quite some coding, especially if URL scheme specific
  checks were performed too, but it might be worth doing. (And perhaps
  such checking could be automatically started when the user normally
  types or pastes something that begins with http: or ftp: for example,
  but this is debatable.)

-- 
Yucca, http://www.malibutelecom.com/yucca/
 alias http://www.cs.tut.fi/~jkorpela/
Technical Details
Message-ID: <Xns90F26EB0992EAjkorpelacstutfi@193.64.137.17>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!news-raspail.gip.net!news.gsl.net!gip.net!news1.spb.su!newsfeed1.funet.fi!newsfeeds.funet.fi!newsfeed.kpnqwest.fi!news.kpnqwest.fi!not-for-mail
References: <Xns90DFA365D2D11Yazorman@127.0.0.1> <Xns90DFDF577C064jkorpelacstutfi@193.64.137.17> <9iv1gq0ndd@enews2.newsguy.com> <slrn9l68kb.3vsc773.llanfair@ID-97657.user.dfncis.de> <9jl0ie01tej@enews1.newsguy.com> <slrn9m2omm.3vscq7v.llanfair@ID-97657.user.dfncis.de>

Show Full Headers
Complete Article Headers
Message-ID: <Xns90F26EB0992EAjkorpelacstutfi@193.64.137.17>
Subject: Re: XNEWS: Error with � in URL
Date: Fri, 03 Aug 2001 07:53:50 GMT
From: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
References: <Xns90DFA365D2D11Yazorman@127.0.0.1> <Xns90DFDF577C064jkorpelacstutfi@193.64.137.17> <9iv1gq0ndd@enews2.newsguy.com> <slrn9l68kb.3vsc773.llanfair@ID-97657.user.dfncis.de> <9jl0ie01tej@enews1.newsguy.com> <slrn9m2omm.3vscq7v.llanfair@ID-97657.user.dfncis.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!195.25.12.36!oleane.net!oleane!news-raspail.gip.net!news.gsl.net!gip.net!news1.spb.su!newsfeed1.funet.fi!newsfeeds.funet.fi!newsfeed.kpnqwest.fi!news.kpnqwest.fi!not-for-mail
Newsgroups: news.software.readers
User-Agent: Xnews/4.06.22
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Face: C{Jn3L\q!fzxZz{">eW569d,&KqTxMoRn|e:$4I)SW+JR@hXW6,@pC7<4ut^Vkz<3gA]I*fYpbGm}Kk5[UhT](AH]"_JZhX7$ZBXg6J)U;,,-P*w:)$Es\o;}~z~'kuGV0^zIDXgFb$mo-,$OkGFcbj#L]>+r{~'gF]xK]Sp;{Tc"o]fYY\(qR+mE5Ro~]xxnu(eS*@_p7o`,f.-@R^E
Lines: 60
NNTP-Posting-Host: 212.226.144.169
X-Complaints-To: helpdesk@kpnqwest.fi
X-Trace: news.kpnqwest.fi 996825230 212.226.144.169 (Fri, 03 Aug 2001 10:53:50 EET DST)
NNTP-Posting-Date: Fri, 03 Aug 2001 10:53:50 EET DST
Organization: KPNQwest Finland customer news service