Re: OT: HTML Problem -- anyone help?



Chris F Waigl <cwaigl@xxxxxxx> wrote in
news:42ec9bdb$0$20371$79c14f64@xxxxxxxxxxxxxxxxxxxxxxxxxx:

> David W. Fenton wrote:
>>
> >[me]
> >
>>>Here's a URL encoder:
>>><http://www.asifproductions.com/urlencode.php3>
>>
>>
>> I feel really stupid because I have no idea how to use that. I
>> can get the same result by following the links in my file with
>> Mozilla.
>
> Well, you paste the URI-with-holes-and-unsafe-characters[1] in the
> window, hit 'encode', paste the result into your anchor's href
> attribute.

Encode? Is that a command button?

There isn't one:

http://www.dfenton.com/images/URLEncoderMozilla.gif

That's what I see in everything but Opera:

http://www.dfenton.com/images/URLEncoderOpera.gif

Are you seeing something different?

>> Why would I ever use an absolute path? Are you saying that's a
>> flaw of the HTML encoder or best practice for HTML? If the
>> latter, it flies in the face of everything I've ever been taught
>> about HTML! And it would be bloody inconvenient, too, especially
>> when moving content.
>
> Er, it's when you move content that relative URIs become a pain to
> maintain and a source of broken links. The issue becomes even
> greater with contemporary dynamic sites that use a cruft-free URL
> structure that does not map onto an underlying directory scheme.

Didn't there used to be a base-URL meta tag that you could include
in your HTML files to partly account for that?

In any event, I'm never going to separate that data from the HTML
file used to give access to it, so I don't see why absolute URLs
would be helpful.

[]

>>>And as always, <http://validator.w3.org/> is your friend. . . .
>>
>> Well, that validates this page as correct:
>>
>> http://www.dfenton.com/Collegium/Tenebrae/index_utf8.html
>
> The point about the validator is not so much that the page
> validates, but what it tells you and which links to specs are
> provided. I.e. this was a way of pointing you towards the W3C.

I've used the W3C validator many times. It is limited in what it can
and can't tell you.

>> Well, if I *don't* encode it and just use the c cedilla, that
>> doesn't work either.
>
><http://www.w3.org/Addressing/URL/4_URI_Recommentations.html>

Someone else sent me a link that got me there, too.

In another post I quoted my puzzlement over this one. It seems it's
set up backwards, and I also don't quite understand the distinction
that everything in my index.html is HTML (and needs to use HTML
entity encoding) except the part of the HTML that is a URL. If on
the client side the URL is correctly displayed, why can't the
browser send the right data to the web server? It seems, indeed,
that Mozilla-based browsers (and even the ancient NS4.x) manage to
both display and send the right data, while IE and Opera fail on
sending the same thing that they display.

>> This is one I don't get, why our browsers have to interpret two
>> different kinds of character encoding for different functions
>> (for display in the browser vs. for sending a request to a web
>> server).
>
> As Jed Davis pointed out, there might be a bit of a conflict of
> specs here, which means it's better to play safe. (FWIW, I don't
> think that the CDATA spec is totally applicable in this case, but
> I'm not sure if my explanation is correct.) Web application
> standards are in a flux anyway at the moment.
>
> And note that the "different functions" are, indeed, quite
> different: one is the way you talk to a web server, while the
> other describes page markup to a browser.

But talking to the web server is the job of the browser, not of the
person authoring the HTML. So, I see no reason why the browser
shouldn't be able to handle it for me. And, indeed, it's obvious
that certain browsers are quite capable of doing so.

If they are "guessing" about how to interpret the data, is there a
danger that they could guess wrong, given the correct content-type
encoding?

>> Well, I guess those outside the US are accustomed to dealing with
>> this, so I'll just change the URLs to use "%E7" instead of the
>> HTML entity.
>>
>> []
>
>> It's just that I'm rather shocked that the pros in the business
>> over here seem to be so oblivious, and that I've never
>> encountered discussions of this issue in any of my voluminous
>> readings on HTML standards.
>
> Huh? To be honest, I happened to have a web programming/design IRC
> channel open in a chat window last night, and quoted your request
> to them. It raised some knowing smiles. That's a bunch of
> amateurs, not pros, in general, and while they are pretty
> international, nearly half or so were from the US at that
> particular time.
>
> On this point, see my followup to Chris Hansen.

And see my reply to him.

I'm not at all unaware of internationalization issues -- I've been
programming databases around them for 15 years. It's just that this
one slipped by me somehow, because, I guess, I'd never used a
filename with an upper ASCII character in it before.

Thanks for not getting annoyed at the rather tart tone in the
initial part of my reply. In re-reading it, really sounded like I
was blaming you for my own mistake. I was just flabbergasted over
the problem and sort of took that out on you -- my apologies.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
.



Relevant Pages

  • Re: Possible to generate text files in javascript?
    ... Any browser is an application to display HTML ... is not fully hidden on Gecko so say documentElement.firstChild returns ...
    (comp.lang.javascript)
  • Re: Display HTML in Applicaton Window
    ... I want to be able to read a local HTML file and display it in a browser window within my application. ... I also want to submit that page to my application and generate a "Post" to a web server and read the contents back and display back into the same browser window in my application. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ampersand in urls when using xhtml 1.0 strict
    ... My web server is clearly seeing & and the browser (FF ... After including this header I was able to remove the encoded ... the page as HTML, then it was already receiving a content type header ...
    (comp.infosystems.www.authoring.html)
  • Re: The Inquirer
    ... >> can view the source of the HTML. ... web server using IIS 4/5 or whatever. ... Now go to the url with whatever web browser your using. ... Now accordingly why if PHP is "Open Source" why can't I view the Web ...
    (comp.os.vms)
  • Re: Problem viewing HTML on CD - Is there a simple "HTML viewer" for this purpose?
    ... The first page would display, and the links would open a browser ... just have a browser and HTML that the content ... could run from my Vista install on a separate partition. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)