Re: Issue with Mozilla/Firefox & named anchor with Japanese/Korean character

Jean-Marc Desperrier <[email protected]>
Newsgroups gmane.comp.mozilla.internationalization
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Mark Tyndall wrote:
> Jean-Marc Desperrier wrote:
>> Mark Tyndall wrote:
>>
>>> kgs wrote:
> [...]
>>>> http://docs.hp.com/ko/allproducts.html#bh7800%20%BC%AD%B9%F6
>>>
>>> It also has a space character (%20).
>>
>> It does not have a space character.
>>
>> The content of the name attribute is not an url, so it can not be 
>> urlencoded, so this should be interpreted as really %20, and not as 
>> the url encoding of the space character.

Sorry for my really confusing statement.

Everything I wrote applied in fact to the content inside the 'name' 
attribute of 'a' tag in the target page, and *not* to the link above.

The link itself is an URL and has to be decoded (so it does have a space 
character).

The name attribute in the page is not an URL, and for it's content to 
match the above URL, you must decode the URL and put the result inside 
the name attribute.

> [...]
> So, if I understand you:
> 
> <a href="foo#bar">baz</a>
> <a name="bar">quux</a>
> 
> bar can include spaces; and should (must?) be included verbatim (without 
> encoding) in the href=""?

The content of the name attribute must be verbatim.
The content of the href attribute must be encoded.

It could give the following inside a page encoded in iso-8859-1 :

<a href="foo#bar%20%E9">baz</a>
<a name="bar é">quux</a>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.