Re: [whatwg/url] Issues with UTS #46 tests (#341)

I apologise for the bump, and I'd be happy to open a new issue if that would be better. But I've also encountered an issue with the UTS46 tests.

Is anybody successfully using the latest version of the tests?

For example, I've been getting error "P1". That corresponds to [processing step 1](https://www.unicode.org/reports/tr46/#Processing), the mapping table. The specific test that was failing was `"xn--1ch."`, which should flag an error at this step to signal a codepoint with the state "disallowed",  but for some reason it wasn't doing that.

Looking at the section on mapping, it appears that this specific codepoint is marked [`disallowed_STD3_valid`](https://www.unicode.org/reports/tr46/#IDNA_Mapping_Table) - in other words:

> the status is **disallowed** if **UseSTD3ASCIIRules=true** (the normal case); implementations that allow **UseSTD3ASCIIRules=false** would treat the code point as **valid**.

We apparently use the not-normal case, so my implementation is behaving correctly for a URL context, but I don't have the ability to ignore only those errors that are due to this difference.

I managed to [find the offending code](https://github.com/unicode-org/unicodetools/blob/e0437866c91eb1b447b7728c9054c6ed83a3a95b/unicodetools/src/main/java/org/unicode/idna/Uts46.java#L491), and sure enough, it is considering code-points disallowed and throwing out error P1's regardless of the value of `UseSTD3ASCIIRules`. 

I was about to file a bug, but this is the first time I'm encountering this algorithm so I'm not entirely sure if I messed up. It all seems to line up and the evidence appears to corroborate the story. But it obviously raises questions about what everybody else is doing to test conformance.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/341#issuecomment-1115988436
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/341/1115988436@github.com>

Received on Tuesday, 3 May 2022 11:23:36 UTC