URI (%C3%A5) versus IRI (å)

Document history: Version 1 - initial version. Version 2 - fixed an error. Version 3 - fixed an incorrect recording of the results for Safari in Table 5.
Document purpose: Exposing variation in which idrefs a IRI versus a URI is matching in various browsers.
Key question: How do browsers look at an idref that, character-by-character (minus the hash character), matches the characters in the percent encoded representation of that idref?

Results summary:

The Blink behavior indicates that the browser, for percentage encoded URLs, tries a literal match before it tries the 'semantic' UTF-8 based match.
The Webkit behavior indicates that the browser tries a literal match even for directly typed URLs (when the code point i higher than U+009F, as required by the URL spec).

Testing id="å" and id="%C3%A5".

Table 1: Test URLs
URL testExpected idref to be targetedActually targeted idref
id=å id=%C3%A5
IRI as URI:#%C3%A5 id=åFfox, IE11Safari, Chrome
Explicitly targeting %C3%A5#%25C3%25A5id=%C3%A5Ffox, IE11, Safari, Chrome
IRI as named character entity:#&aringid=åFfox, IE11, ChromeSafari
IRI as decimal character reference:#&#x229id=åFfox, IE11, ChromeSafari
IRI as hexadecimal character reference:#&#xe5 id=åFfox, IE11, ChromeSafari
IRI as directly typed character: id=åFfox, IE11, ChromeSafari

Table 2: Idref targets for test urls in table 1.
Target 1:Target 2:
Back to table 1
id=å
id=%C3%A5

Testing only id="æ" (no test of id="%C3%A6")

This test ommits a percent-encoded idref (id="%C3%A6") fragment - this in order to demonstrate that the problem does not manifestate itself when a matching percent-encoded idref is not presenct.

Table 3: Test URLs
URL testExpected idref to be targetedActually targeted idref
id=æ
IRI as URI:#%C3%A6 id=æFfox, IE11, Chrome, Safari
IRI as directly typed character: id=æFfox, IE11, Chrome, Safari

Table 4: Idref targets for test urls in table 3.
Target
Back to table 3
id=æ

Testing id="a" and id="%61".

This test tests a pure ASCII idref versus its ”corresponding” percentencoded variant. Interestingly Safari in this test behaves like Chrome

Table 5: Test URLs
URL testExpected idref to be targetedActually targeted idref
id=a id=%61
IRI as URI:#%61 id=aFfox, IE11Safari, Chrome
Explicitly targeting %C3%A5#%2561id=%61Ffox, IE11, Safari, Chrome
IRI as decimal character reference:#&#97id=aFfox, IE11, Chrome, Safari
IRI as hexadecimal character reference:#&#x61 id=aFfox, IE11, Chrome, Safari
IRI as directly typed character:#a id=aFfox, IE11, Chrome, Safari

Table 6: Idref targets for test urls in table 5.
Target 1:Target 2:
Back to table 5
id=a
id=%61